Method of decoding an image using indicated most probable mode

ABSTRACT

Provided is a method of decoding an image, the method including: determining at least one prediction unit included in a current frame that is one of at least one frame forming the image; determining a reference region to be referred to by a current prediction unit that is one of the at least one prediction unit; changing a sample value included in at least one of the current prediction unit and the reference region, based on an analyzing result of a sample value of the reference region; determining a sample value included in the current prediction unit, based on a result of changing the sample value; and decoding the image based on the determined sample value of the current prediction unit.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.15/998,658, filed on Aug. 16, 2018, in the U.S. Patent and TrademarkOffice, which is a National Stage Entry of International Application No.PCT/KR2017/001644, filed on Feb. 15, 2017, which claims priority fromU.S. Provisional Application No. 62/295,669, filed on Feb. 16, 2016, inthe U.S. Patent and Trademark Office, the disclosures of which areincorporated herein by reference in their entireties.

TECHNICAL FIELD

A method and apparatus according to an embodiment are for efficientlyperforming prediction during an encoding or decoding process of animage.

BACKGROUND ART

Image data is encoded using a codec according to a certain datacompression standard, for example, the moving picture expert group(MPEG) standard, and then is stored in a recording medium or transmittedthrough a communication channel in the form of a bitstream.

With the development and supply of hardware capable of reproducing andstoring high resolution or high definition image content, the necessityfor a codec that effectively encodes or decodes the high resolution orhigh definition image content is increasing. Encoded image content maybe reproduced by being decoded. Recently, methods for effectivelycompressing such high resolution or high definition image content havebeen executed. For example, an efficient image processing method isimplemented by processing an image to be encoded or decoded via anarbitrary method.

DESCRIPTION OF EMBODIMENTS Technical Problem

According to conventional technology, in which mode, among a pluralityof intra prediction modes, prediction is to be performed during anencoding or decoding process of an image may be determined based on aprediction unit. In prediction units where prediction modes aredetermined to be the same, intra prediction is performed via a samemethod, and prediction is performed regardless of a characteristic of areference region.

Also, a process of selecting a prediction mode is performed byexpressing all prediction modes in a same probability (for example, byperforming fixed length coding) without distinction of a prediction modepractically used the most in a picture from among intra predictionmodes, and such a method causes encoding and decoding processes to beinefficiently performed.

Solution to Problem

According to an aspect of the present disclosure, a method of decodingan image, the method includes: determining at least one prediction unitincluded in a current frame that is one of at least one frame formingthe image; determining a reference region to be referred to by a currentprediction unit that is one of the at least one prediction unit;changing a sample value included in at least one of the currentprediction unit and the reference region, based on an analyzing resultof a sample value of the reference region; determining a sample valueincluded in the current prediction unit, based on a result of changingthe sample value; and decoding the image based on the determined samplevalue of the current prediction unit.

According to another aspect of the present disclosure, an apparatus fordecoding an image, the apparatus includes: a prediction unit determinerconfigured to determine at least one prediction unit included in acurrent frame that is one of at least one frame forming the image; and adecoder configured to determine a reference region to be referred to bya current prediction unit that is one of the at least one predictionunit, change a sample value included in at least one of the currentprediction unit and the reference region, based on an analyzing resultof a sample value of the reference region, determine a sample valueincluded in the current prediction unit, based on a result changing thesample value, and decode the image based on the determined sample valueof the current prediction unit.

According to another aspect of the present disclosure, acomputer-readable recording medium has recorded thereon a computerprogram performing the method.

Advantageous Effects of Disclosure

According to various embodiments, encoding or decoding efficiency can beimproved by effectively determining an intra prediction method to beperformed during an encoding or decoding process of an image.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1A is a block diagram of an image decoding apparatus performing animage decoding method for considering a characteristic of a referenceregion, so as to determine a sample value included in a currentprediction unit, according to an embodiment.

FIG. 1B is a block diagram of an image encoding apparatus performing animage encoding method for considering a characteristic of a referenceregion, so as to determine a sample value included in a currentprediction unit, according to an embodiment.

FIG. 2 is a flowchart of processes by which an image encoding apparatusdetermines a sample value included in a current prediction unit, basedon an analyzing result of a reference region, and encodes an image.

FIG. 3A illustrates a spatial relationship between a current predictionunit and a reference region.

FIG. 3B illustrates another example of a spatial relationship between acurrent prediction unit and a reference region.

FIG. 4A is a flowchart of processes of determining a reference region tobe one of pre-determined N levels, according to an analyzing result ofthe reference region, according to an embodiment.

FIG. 4B is a flowchart of processes of determining a reference region tobe one of pre-determined N levels, by comparing an analyzing result ofthe reference region with a threshold value, according to an embodiment.

FIG. 4C is a flowchart of processes of determining a reference region tobe one of pre-determined N levels by comparing an analyzing result ofthe reference region with a plurality of threshold values, anddetermining whether to change a sample value included in at least one ofa current prediction unit and the reference region, based on thedetermined level.

FIG. 5A illustrates a method of changing a sample value of a referenceregion related to a current prediction unit, according to an analyzingresult of the reference region, according to an embodiment.

FIG. 5B illustrates processes of performing filtering so as to change asample value in a current prediction unit, according to an analyzingresult of a reference region, according to an embodiment.

FIG. 6A illustrates a flowchart of processes of determining whether toanalyze a reference region, based on a prediction mode performed in acurrent prediction unit, according to an embodiment.

FIG. 6B illustrates a flowchart of processes of determining whether toanalyze a reference region, based on whether a prediction mode of acurrent prediction unit is one of pre-determined intra prediction modes,according to an embodiment.

FIG. 7A is a block diagram of an image decoding apparatus for decodingan image by using first information indicating that intra prediction isperformed by using pre-determined at least one prediction mode,according to an embodiment.

FIG. 7B is a block diagram of an image encoding apparatus for encodingan image by using first information indicating that intra prediction isperformed by using pre-determined at least one prediction mode,according to an embodiment.

FIG. 8 is a flowchart of an image decoding apparatus decoding an imageby obtaining first information and second information from a bitstream,according to an embodiment.

FIG. 9 is a flowchart of a method by which an image decoding apparatusdetermines one of intra prediction modes excluding pre-determined atleast one prediction mode related to first information, by referring toan intra prediction mode of a neighboring block, according to anembodiment.

FIG. 10 illustrates processes of determining at least one coding unit asa current coding unit is split, according to an embodiment.

FIG. 11 illustrates processes of determining at least one coding unitwhen a coding unit having a non-square shape is split, according to anembodiment.

FIG. 12 illustrates processes of splitting a coding unit, based on atleast one of a block shape information and split shape information,according to an embodiment.

FIG. 13 illustrates a method of determining a certain coding unit fromamong an odd number of coding units, according to an embodiment.

FIG. 14 illustrates an order of processing a plurality of coding unitswhen the plurality of coding units are determined when a current codingunit is split, according to an embodiment.

FIG. 15 illustrates processes of determining that a current coding unitis split into an odd number of coding units when coding units are notprocessable in a certain order, according to an embodiment.

FIG. 16 illustrates processes of determining at least one coding unitwhen a first coding unit is split, according to an embodiment.

FIG. 17 illustrates that a shape into which a second coding unit issplittable is restricted when the second coding unit having a non-squareshape determined when a first coding unit is split satisfies a certaincondition, according to an embodiment.

FIG. 18 illustrates processes of splitting a coding unit having a squareshape when split shape information is unable to indicate that a codingunit is split into four square shapes, according to an embodiment.

FIG. 19 illustrates that an order of processing a plurality of codingunits may be changed according to processes of splitting a coding unit,according to an embodiment.

FIG. 20 illustrates processes of determining a depth of a coding unit asa shape and size of the coding unit are changed, when a plurality ofcoding units are determined when the coding unit is recursively split,according to an embodiment.

FIG. 21 illustrates a part index (PID) for distinguishing depths andcoding units, which may be determined according to shapes and sizes ofcoding units, according to an embodiment.

FIG. 22 illustrates that a plurality of coding units are determinedaccording to a plurality of certain data units included in a picture,according to an embodiment.

FIG. 23 illustrates a processing block serving as a criterion ofdetermining a determination order of reference coding units included ina picture, according to an embodiment.

BEST MODE

According to an aspect of the present disclosure, a method of decodingan image, the method includes: determining at least one prediction unitincluded in a current frame that is one of at least one frame formingthe image; determining a reference region to be referred to by a currentprediction unit that is one of the at least one prediction unit;changing a sample value included in at least one of the currentprediction unit and the reference region, based on an analyzing resultof a sample value of the reference region; determining a sample valueincluded in the current prediction unit, based on a result of changingthe sample value; and decoding the image based on the determined samplevalue of the current prediction unit.

The changing of the sample value included in at least one of the currentprediction unit and the reference region may include: determining alevel to which the reference region belongs to be one of pre-determinedN levels, based on a sample value of the reference region; and changingthe sample value included in at least one of the current prediction unitand the reference region, based on the determined level.

The changing of the sample value included in at least one of the currentprediction unit and the reference region, based on the determined levelmay include changing the sample value by using different methods for theN levels.

The determining of the level to which the reference region belongs to beone of pre-determined N levels may include determining the level towhich the reference region belongs, by comparing the analyzing result ofthe sample value of the reference region with at least one thresholdvalue.

The changing of the sample value included in at least one of the currentprediction unit and the reference region, based on the determined levelmay include changing the sample value of the reference region byperforming, from among pre-determined filtering, filtering related tothe determined level on the sample value of the reference region.

The changing of the sample value of the reference region by performingfiltering may include changing the sample value of the reference regionby performing, on the sample value of the reference region, one of 5-tapfiltering, 3-tap filtering, median filtering, and mean filtering, basedon the determined level.

The changing of the sample value included in at least one of the currentprediction unit and the reference region, based on the determined levelmay include: determining the level to which the reference regionbelongs, based on complexity according to distribution of sample valuesof the reference region; and changing the sample value of the referenceregion by performing the filtering related to the determined level,wherein the filtering related to the determined level may be strongerwhen the complexity is higher.

The changing of the sample value included in at least one of the currentprediction unit and the reference region, based on the determined levelmay include: performing intra prediction in the current prediction unit;and changing a prediction sample value of the current prediction unit byperforming, from among pre-determined filtering, filtering related tothe determined level on the prediction sample value, based on thedetermined level, wherein the prediction sample value is a result ofperforming the intra prediction.

The changing of the prediction sample value of the current predictionunit may include changing the prediction sample value of the currentprediction unit by performing partial difference equation (PDE)-basedfiltering on the prediction sample value, based on the determined level,wherein the prediction sample value may be the result of performing theintra prediction.

The changing of the prediction sample value of the current predictionunit may include changing the prediction sample value of the currentprediction unit by performing filtering based on a distance between thecurrent prediction unit and the reference region, based on thedetermined level.

The changing of the sample value included in at least one of the currentprediction unit and the reference region, based on the determined levelmay include changing the prediction sample value of the currentprediction unit by adding pseudo-random noise to the prediction samplevalue according to a noise amount in the current prediction unit,wherein the prediction sample value may be the result of performing theintra prediction.

The changing of the sample value included in at least one of the currentprediction unit and the reference region may include changing the samplevalue, only when prediction is performed according to a pre-determinedintra prediction mode in the current prediction unit.

The determining of the reference region may include: obtaining, from abitstream, information indicating whether the image is to be decoded byusing the sample value included in at least one of the currentprediction unit and the reference region and changed according to theanalyzing result of the sample value of the reference region; anddetermining the reference region only when the information indicatesthat the image is to be decoded by using the sample value included in atleast one of the current prediction unit and the reference region andchanged according to the analyzing result of the sample value of thereference region.

According to another aspect of the present disclosure, an apparatus fordecoding an image, the apparatus includes: a prediction unit determinerconfigured to determine at least one prediction unit included in acurrent frame that is one of at least one frame forming the image; and adecoder configured to determine a reference region to be referred to bya current prediction unit that is one of the at least one predictionunit, change a sample value included in at least one of the currentprediction unit and the reference region, based on an analyzing resultof a sample value of the reference region, determine a sample valueincluded in the current prediction unit, based on a result changing thesample value, and decode the image based on the determined sample valueof the current prediction unit.

According to another aspect of the present disclosure, acomputer-readable recording medium has recorded thereon a computerprogram performing the method.

MODE OF DISCLOSURE

Advantages and features of the present disclosure and methods ofaccomplishing the same may be understood more readily by reference tothe following detailed description of the embodiments and theaccompanying drawings. In this regard, the present disclosure may havedifferent forms and should not be construed as being limited to thedescriptions set forth herein. Rather, embodiments are provided so thatthis disclosure of the present specification will be thorough andcomplete and will fully convey the concept of the present disclosure toone of ordinary skill in the art.

Hereinafter, the terms used in the specification will be brieflydefined, and the present disclosure will be described in detail.

All terms including descriptive or technical terms which are used hereinshould be construed as having meanings that are obvious to one ofordinary skill in the art. However, the terms may have differentmeanings according to the intention of one of ordinary skill in the art,precedent cases, or the appearance of new technologies. Also, some termsmay be arbitrarily selected by the applicant, and in this case, themeaning of the selected terms will be described in detail in thedetailed description of the disclosure. Thus, the terms used herein haveto be defined based on the meaning of the terms together with thedescription throughout the disclosure.

An expression used in the singular encompasses the expression of theplural, unless it has a clearly different meaning in the context.

When a part “includes” or “comprises” an element, unless there is aparticular description contrary thereto, the part can further includeother elements, not excluding the other elements. Also, the term “unit”in the embodiments of the specification means a software component orhardware component such as a field-programmable gate array (FPGA) or anapplication-specific integrated circuit (ASIC), and performs a specificfunction. However, the term “unit” is not limited to software orhardware. The “unit” may be formed so as to be in an addressable storagemedium, or may be formed so as to operate one or more processors. Thus,for example, the term “unit” may refer to components such as softwarecomponents, object-oriented software components, class components, andtask components, and may include processes, functions, attributes,procedures, subroutines, segments of program code, drivers, firmware,micro codes, circuits, data, a database, data structures, tables,arrays, or variables. A function provided by the components and “units”may be associated with the smaller number of components and “units”, ormay be divided into additional components and “units”.

Hereinafter, an “image” may denote a static image such as a still imageor a dynamic image such as a moving image, i.e., a video itself.

Hereinafter, a “sample” is data allocated to a sampling location of animage and may mean data that is a processing target. For example, pixelvalues in an image of a spatial domain or transformation coefficients ona transformation domain may be samples. A unit including at least onesample may be defined as a block.

Reference will now be made in detail to embodiments of the presentdisclosure, examples of which are illustrated in the accompanyingdrawings. In the following description, well-known functions orconstructions are not described in detail so as not to obscure thepresent disclosure with unnecessary detail.

FIG. 1A is a block diagram of an image decoding apparatus performing animage decoding method for considering a characteristic of a referenceregion, so as to determine a sample value included in a currentprediction unit, according to an embodiment.

Referring to FIG. 1A, an image decoding apparatus 100 may include aprediction unit determiner 110 for determining a prediction unit that isone of various data units included in a current frame, and a decoder 120decoding an image based on the determined prediction unit. According toan embodiment, operations performed by the prediction unit determiner110 and operations performed by the decoder 120 may be performed bydistinguished software components, or by one piece of hardware (forexample, a processor). Details about operations of the image decodingapparatus 100 are described through various embodiments hereinbelow.

FIG. 2 is a flowchart of processes by which the image decoding apparatus100 determines a sample value included in a current prediction unit,based on an analyzing result of a reference region, and decodes animage, according to an embodiment.

In operation S200, the prediction unit determiner 110 of the imagedecoding apparatus 100 may determine at least one prediction unitincluded in a current frame that is one of at least one frame forming animage, according to an embodiment.

According to an embodiment, the decoder 120 may determine at least onecoding unit included in the current frame prior to a process ofdetermining the at least one prediction unit, and the prediction unitdeterminer 110 may determine the at least one prediction unit includedin each coding unit. In other words, the prediction unit determiner 110may determine the at least one prediction unit included in a currentcoding unit that is one of the at least one coding unit.

According to another embodiment, the decoder 120 may determine the atleast one coding unit included in the current frame and determine thatprediction is performed based on the determined coding unit. Accordingto an embodiment, when the at least one coding unit not only has asquare shape, but may also have a non-square shape, the image decodingapparatus 100 may use the at least one coding unit as a data unit usedwhile performing prediction. Thus, according to various embodiments, acoding unit and a prediction unit may have the same size or theprediction unit may be included in the coding unit, and thushereinafter, a data unit used during prediction will be referred to as aprediction unit for convenience of description. Also, processes ofdetermining a coding unit according to an embodiment will be describedlater through various embodiments show in FIG. 10 .

According to an embodiment, the prediction unit determiner 110 mayobtain, from a bitstream, various types of information so as todetermine a prediction unit. For example, the image decoding apparatus100 may obtain, from a received bitstream, information indicatingwhether prediction is performed based on a data unit having a same sizeas a current coding unit, information indicating a shape of at least oneprediction unit included in the current coding unit, etc., and use theinformation to determine at least one prediction unit.

In operation S202, the image decoding apparatus 100 may determine areference region to be referred to by a current prediction unit that isone of the at least one prediction unit, according to an embodiment.According to an embodiment, a reference region may be defined as apre-determined data unit that may be referred to by a current predictionunit so as to determine a sample value included in the currentprediction unit.

FIG. 3A illustrates a spatial relationship between the currentprediction unit and the reference region.

According to an embodiment, the decoder 120 of the image decodingapparatus 100 may determine a reference region adjacent to a currentprediction unit, so as to determine a sample value of samples includedin the current prediction unit. Referring to FIG. 3A, the decoder 120may determine a reference region 304 adjacent to an upper boundary of acurrent prediction unit 300 as a reference region to which the currentprediction unit 300 refers.

According to an embodiment, a shape of the reference region may indicatea shape of various data units. According to an embodiment, the referenceregion may have a same size as the current prediction unit or maycorrespond to a total size of an integer number of the currentprediction units. Referring to FIG. 3A, the decoder 120 may determinethe reference region 304 that is adjacent to the upper boundary of thecurrent prediction unit 300 and has a same shape as the currentprediction unit 300.

As another example, referring to FIG. 3A, the decoder 120 may determinea reference region 302 that is adjacent to a left boundary of thecurrent prediction unit 300 and has a shape of a region corresponding tothree times the size of the current prediction unit 300.

FIG. 3B illustrates another example of a spatial relationship between acurrent prediction unit and a reference region.

Referring to FIG. 3B, the decoder 120 may determine a reference regionadjacent to an upper boundary of a current prediction unit 305 as areference region to which the current prediction unit 300 refers.

According to an embodiment, a shape of a reference region may indicate ashape of various data units. According to an embodiment, a referenceregion may not have a shape having an integer multiple size of a currentprediction unit. Referring to FIG. 3B, the decoder 120 may determine, asa reference region, at least one sample row 306 adjacent to the upperboundary of the current prediction unit 300. According to an embodiment,a horizontal size of the sample row 306 may be an integer multiple of ahorizontal size of the current prediction unit 305.

As another example, referring to FIG. 3B, the decoder 120 may determine,as a reference region, at least one sample column 307 adjacent to a leftboundary of the current prediction unit 305. According to an embodiment,a vertical size of the sample column 307 may be the same as a verticalsize of the current prediction unit 305.

According to an embodiment, the decoder 120 may determine, as areference region, a region including reference samples referred toduring intra prediction of a current prediction unit.

Here, a shape of a reference region referred to by a current predictionunit may be related to at least one of a horizontal size and a verticalsize of the current prediction unit, but should not be limitedlyinterpreted to above embodiments, and the reference region may bedetermined to be an arbitrary region at a pre-determined location in acurrent frame, which may be referred to by the current prediction unit.

According to an embodiment, a reference region related to a currentprediction unit may be a pre-determined region that is not adjacent tothe current prediction unit. According to an embodiment, a referenceregion may be determined to be a region adjacent to a boundary of a dataunit (for example, a coding unit, a largest coding unit, a slice, aslice segment, or the like) including a current prediction unit.

In operation S204, the image decoding apparatus 100 may change a samplevalue included in at least one of the current prediction unit and thereference region, based on an analyzing result of a sample value of thereference region, according to an embodiment.

According to an embodiment, the decoder 120 may use various methods toanalyze characteristics of sample values included in the referenceregion. According to an embodiment, the decoder 120 may perform variousanalyses, such as complexity, correlation, contrast, variance, noiseinclusion, gradient, eigenvalue, transform coefficient, directivity,histogram, etc., based on the sample values of the reference region. Thedecoder 120 may change the sample value included in at least one of thecurrent prediction unit and the reference region that is an analysistarget, based on such analyzing result of the reference region.

According to an embodiment, the decoder 120 may refer to sample valuesof a reference region located at at least one of left and upperdirections of a current prediction unit and obtain an analyzing resultof the referred sample values. In other words, a shape of the referenceregion to be analyzed by the image decoding apparatus 100 may vary asdescribed above, and a relative location of the reference region withrespect to the current prediction unit may be a location adjacent to atleast one of left and upper boundaries of the current prediction unit,but may alternatively be a location not adjacent to a boundary of thecurrent prediction unit (for example, a location adjacent to a boundaryof a coding unit, a largest coding unit, a slice, a slice segment, orthe like including the current prediction unit).

According to an embodiment, samples included in a reference region mayinclude sample values decoded previously to the decoding of a currentprediction unit.

According to an embodiment, various filtering processes may be performedon a boundary of at least one of a current prediction unit and areference region, so as to change a sample value included in at leastone of the current prediction unit and the reference region, based on ananalyzing result. Processes of changing each of sample values will bedescribed later through various embodiments.

In operation S206, the decoder 120 may determine the sample valueincluded in the current prediction unit, based on a result of changingthe sample value, according to an embodiment. The decoder 120 maydetermine sample values of the current prediction unit according to aresult the changing of operation S204 and use the sample values duringdecoding later. For example, the decoder 120 may amend a predictionsample value included in the current prediction unit, based on theanalyzing result of the reference region, or as another example, thesample value of the reference region may be changed and intra predictionin the current prediction unit may be performed by referring to thechanged sample value. Details thereof will be described later throughvarious embodiments.

In operation S208, the decoder 120 may decode an image based on thesample value of the current prediction unit determined in operationS206, according to an embodiment. The decoder 120 may perform imagedecoding by processing various types of data including the sample valueof the current prediction unit while performing image decodingprocesses. In other words, the sample value of the current predictionunit determined in operation S206 may be used as a prediction samplevalue during the image decoding processes and used as a result ofperforming pre-determined filtering processes.

FIG. 4A is a flowchart of processes of determining a reference region tobe one of pre-determined N levels, according to an analyzing result ofthe reference region, according to an embodiment.

Since features of operations S400 and S402 respectively include similarfeatures as operations S200 and S202 of FIG. 2 , details thereof are notprovided again.

In operation S404, the decoder 120 may determine a level, to which thereference region belongs, to be one of pre-determined N levels, based ona sample value of the reference region determined in operation S402, soas to analyze the reference region. According to an embodiment, thedecoder 120 may determine a characteristic of the reference region to bereferred to by the current prediction unit by determining the level ofthe reference region to be one of the pre-determined N levels. Thepre-determined N levels are classified based on an analyzing result,according to one of the characteristics of the reference region (forexample, complexity, correlation, contrast, variance, noise inclusion,gradient, eigenvalue, transform coefficient, directivity, histogram,etc). For example, the decoder 120 may classify the reference region toN levels, based on distribution of the reference region, and determinewhether the reference region is a region having high contrast due to alarge difference between a maximum value and a minimum value of samplevalues of the reference region, or a region having large noise,according to a result of analyzing distribution of the sample values.

In operation S406, the decoder 120 may change a sample value included inat least one of the current prediction unit and the reference region,based on the level determined in operation S402, according to anembodiment. The decoder 120 may change the sample value included in atleast one of the current prediction unit and the reference region, byusing a sample value changing method pre-determined in relation to eachlevel. For example, when the sample value is changed by performingfiltering on a boundary of the current prediction unit, the decoder 120may perform filtering of different intensities per level.

According to an embodiment, when filtering related to the level to whichthe reference region belongs is performed on a prediction sample valueincluded in the current prediction unit, the decoder 120 may change theprediction sample value that is a result of performing intra predictionincluded in the current prediction unit to use the changed predictionsample value during reconstruction processes after prediction.

According to another embodiment, when the filtering related to the levelto which the reference region belongs is performed on a sample valueincluded in the reference region, the decoder 120 may change the samplevalue included in the reference region, and then perform decodingprocesses by using the changed sample value. For example, when thereference region is a region referred to during intra predictionprocesses of the current prediction unit, the filtering related to thelevel to which the reference region belongs is performed to change thesample value of the reference region, and then intra prediction based onthe changed sample value of the reference region may be performed duringintra prediction processes of the current prediction unit.

However, a method of changing the sample value included in at least oneof the current prediction unit and the reference region should not beinterpreted limitedly to the filtering described above, and various dataprocessing methods usable while processing the sample value may beincluded.

Since features of operations S408 and S410 may respectively correspondto features similar to those of operations S206 and S208 of FIG. 2 ,details thereof are not provided again.

FIG. 4B is a flowchart of processes of determining a reference region tobe one of pre-determined N levels, by comparing an analyzing result ofthe reference region with a threshold value, according to an embodiment.

Since features of operations S420 and S422 respectively include similarfeatures as operations S400 and S402 of FIG. 4A, details thereof are notprovided again.

In operation S423, the decoder 120 may determine one of thepre-determined N levels as the level of the reference region, bycomparing the analyzing result of the sample value of the referenceregion with a pre-determined threshold value A. According to anembodiment, the pre-determined threshold value A may be set differentlybased on which characteristic of the sample value of the referenceregion is analyzed by the decoder 120. For example, a threshold value tobe compared by calculating complexity of the reference region and athreshold value to be compared by calculating distribution of thereference region may be different. In other words, the decoder 120 maydetermine and use different threshold values per characteristic of thereference region to be analyzed.

When it is determined that the analyzing result of the sample value ofthe reference region is higher than the threshold value A in operationS423, the decoder 120 may determine the level to which the referenceregion belongs to a first level in operation S424.

When it is determined that the analyzing result of the sample value ofthe reference region is lower than or equal to the threshold value A inoperation S423, the decoder 120 may determine the level to which thereference region belongs to a second level in operation S432.

In operation S426, the decoder 120 may change the sample value includedin at least one of the current prediction unit and the reference regionby using a sample value changing method related to the level of thereference region, which is determined to be the first or second level.Since features of operations S426 through S430 may respectivelycorrespond to features similar to those of operations S406 through S410of FIG. 4A, details thereof are not provided again.

FIG. 4C is a flowchart of processes of determining a reference region tobe one of pre-determined N levels, by comparing an analyzing result ofthe reference region with a plurality of threshold values, anddetermining whether to change a sample value included in at least one ofa current prediction unit and the reference region, based on thedetermined level.

Since features of operations S440 and S442 respectively include similarfeatures as operations S420 and S422 of FIG. 4B, details thereof are notprovided again.

In operation S443, the decoder 120 may determine one of thepre-determined N levels as the level of the reference region, bycomparing the analyzing result of the sample value of the referenceregion with the pre-determined threshold value A, according to anembodiment. When the analyzing result of the sample value of thereference region is higher than the pre-determined threshold value A,the decoder 120 may determine the level to which the reference regionbelongs to the first level in operation S444.

According to an embodiment, when the analyzing result of the samplevalue of the reference region is lower than or equal to thepre-determined threshold value A, the decoder 120 may determine one ofthe pre-determined N levels to be the level of the reference region, bycomparing the analyzing result of the sample value of the referenceregion with a pre-determined threshold value B, according to anembodiment, in operation S452. According to an embodiment, when theanalyzing result of the sample value of the reference region is higherthan the pre-determined threshold value B, the level to which thereference region belongs may be determined to be the second level.

In operation S446, the decoder 120 may change the sample value includedin at least one of the current prediction unit and the reference region,by using a sample value changing method related to the level of thereference region, which is determined to be the first or second level.Since features of operations S446 through S450 may respectivelycorrespond to features similar to those of operations S406 through S410of FIG. 4A, details thereof are not provided again.

According to an embodiment, the sample value changing method related tothe first or second level may vary according to levels. For example,when the decoder 120 changes the sample value by performing filtering onthe sample value included in at least one of the current prediction unitand the reference region, the decoder 120 may change the sample value byperforming filtering while varying the number of filter-tabs between thefirst and second levels (for example, 5-tap filter, 3-tap filter, or thelike) or by varying a type of filtering (for example, Gaussianfiltering, partial difference equation (PDE)-based filtering, medianfiltering, or the like).

According to an embodiment, when the analyzing result of the samplevalue of the reference region is lower than or equal to thepre-determined threshold value B, the decoder 120 may determine thelevel to which the reference region belongs to a third level inoperation S456.

In operation S458, based on the determination of the level to which thereference region belongs to the third level according to the analyzingresult of the sample value of the reference region, the decoder 120 mayperform decoding using samples included in the current prediction unitwithout changing the sample value included in at least one of thecurrent prediction unit and the reference region as in the first andsecond levels.

According to an embodiment, when the reference region belongs to thethird level, the decoder 120 may perform reconstruction processes afterprediction, without changing the prediction sample value that is aresult of performing intra prediction included in the current predictionunit. According to another embodiment, when the reference region is inthe third level, the decoder 120 may use the reference region duringdecoding processes without changing the sample value of the referenceregion. For example, when the reference region is a region that may bereferred to during intra prediction processes of the current predictionunit, the decoder 120 may use the sample value of the reference regionduring intra prediction processes of the current prediction unit withoutchanging the sample value.

FIG. 5A illustrates a method of changing a sample value of a referenceregion related to a current prediction unit, according to an analyzingresult of the reference region, according to an embodiment.

According to an embodiment, the prediction unit determiner 110 maydetermine at least one prediction unit included in a current frame, andthe decoder 120 may determine a reference region related to a currentprediction unit 500 that is one of the at least one prediction unit.Referring to FIG. 5A, a reference region 502 adjacent to a left boundaryof the current prediction unit 500 may include a plurality of samples,and the decoder 120 may perform sample value changing processes (forexample, filtering or smoothing of samples adjacent to a boundary) withrespect to a level to which a reference region belongs, based on ananalyzing result of the reference region 502, according to anembodiment. The reference region 502 is adjacent to the left boundary ofthe current prediction unit 500, and accordingly, the decoder 120 mayperform filtering or smoothing processes of changing sample valuesincluded in the reference region 502, based on a distance with the leftboundary of the current prediction unit 500. In other words, through thefiltering or smoothing processes based on the distance with the boundaryof the current prediction unit 500, the effects of the sample valuesincluded in the reference region 502 on the current prediction unit 500during decoding processes may be adjusted.

According to an embodiment, the decoder 120 may apply a 5-tap filter ([33 4 3 3]/16, [2 3 6 3 2]/16, or the like), an M-tap Gaussian filter, anM-tap median filter, or the like to a sample value adjacent to theboundary of the reference region 502. According to an embodiment, alocation of a sample to which filtering is performed by the decoder 120may include not only samples adjacent to the boundary of the referenceregion 502, but also at least one sample row or column from theboundary, and the number of filter-tabs or filtering intensity may varyaccording to a distance from the boundary.

However, a filtering method that may be performed in a reference regionshould not be interpreted limitedly to the embodiments above, andvarious filtering methods that may include relatively more low frequencycomponents in terms of signalling processing of a sample value of areference region may be performed. According to an embodiment, thedecoder 120 may perform the above embodiments of changing a sample valueof a reference region only when the reference region related to acurrent prediction unit is a texture region.

FIG. 5B illustrates processes of performing filtering so as to change asample value in a current prediction unit, according to an analyzingresult of a reference region, according to an embodiment.

Referring to FIG. 5B, a reference region 512 adjacent to an upperboundary of a current prediction unit 510 may include a plurality ofsamples, and the decoder 120 may perform sample value changing processes(for example, filtering or smoothing of samples adjacent to a boundary)with respect to a level to which a reference region belongs, based on ananalyzing result of the reference region 512, according to anembodiment. The reference region 512 is adjacent to the upper boundaryof the current prediction unit 510, and accordingly, the decoder 120 mayperform filtering or smoothing processes of changing sample valuesincluded in the reference region 512, based on a distance with the leftboundary of the current prediction unit 510.

According to an embodiment, the decoder 120 may apply a 5-tap filter ([33 4 3 3]/16, [2 3 6 3 2]/16, or the like), an M-tap Gaussian filter, anM-tap median filter, or the like to a sample value adjacent to aboundary of the reference region 512. According to an embodiment, alocation of a sample to which filtering is performed by the decoder 120may include not only samples adjacent to the boundary of the referenceregion 512, but also at least one sample row or column from theboundary, and the number of filter-tabs or filtering intensity may varyaccording to a distance from the boundary.

Referring to FIG. 5B, the decoder 120 may perform filtering for reducingartifacts generated due to a difference between sample values at aboundary between the reference region 512 and the current predictionunit 510, and according to an embodiment, may perform PDE-basedfiltering. When the decoder 120 performs PDE-based filtering on theboundary of the current prediction unit 510, a sample value of thecurrent prediction unit 510 is affected more by a sample value of thereference region 512 closer to a boundary of the reference region 512,and thus a sample value difference between the reference region 512 andthe current prediction unit 510 may be reduced, and accordingly,objective or subjective image quality may be improved. The decoder 120may perform filtering of changing a sample value such that samples atlocations not adjacent to the reference region 512, from among samplesincluded in the current prediction unit 510, are determined to be thesame as existing sample values of the current prediction unit 510, orinclude relatively more low frequency components compared to theexisting sample values in terms of signalling processing.

Referring to FIG. 5B, the decoder 120 may perform PDE-based filtering onsample rows 514 a through 514 d adjacent to the boundary of the currentprediction unit 510 to change sample values (for example, as indicatedby reference numerals 518 a and 518 b) such that differences betweensample values (for example, 516 a through 516 d) respectively of thesample rows 514 a through 514 d and a sample value (for example, 516 e)located at a boundary 514 e of the reference region 512 are reduced.

However, since a PDE-based filtering method described above may beembodied in various forms according to sample values included in areference region and a current prediction unit, the PDE-based filteringmethod should not be interpreted limitedly to a filtering methoddescribed above, and various types of PDE-based filtering methodsreducing a difference between a current prediction unit and a referenceregion may be used.

According to an embodiment, the decoder 120 may perform the aboveembodiments of changing a sample value of a current prediction unit onlywhen a reference region related to the current prediction unit is atexture region.

According to an embodiment, the decoder 120 may perform decoding bycombining two changing processes after changing sample values of thereference region and the current prediction unit, based on the analyzingresult of the reference region. In other words, the decoder 120 maychange the sample value of the reference region by performing filteringrelated to the level to which the reference region belongs on sampleslocated at the boundary of the reference region. In addition, thedecoder 120 may determine a prediction sample value of the currentprediction unit by referring to the changed sample value of thereference region and change the prediction sample value included in thecurrent prediction unit by performing filtering related to the level towhich the reference region belongs on the prediction sample value. Sincea sample value changing method performed on each of the reference regionand the current prediction unit has been described above through variousembodiments, details thereof are not provided again.

According to an embodiment, the image decoding apparatus 100 may changesample values included in the current prediction unit by adding certainnoise. The decoder 120 may add certain noise (for example, pseudo randomnoise) to a sample value included in a current prediction unit, therebyreducing banding noise.

FIG. 6A illustrates a flowchart of processes of determining whether toanalyze a reference region, based on a prediction mode performed in acurrent prediction unit, according to an embodiment.

In operation S600, the prediction unit determiner 110 of the imagedecoding apparatus 100 may determine at least one prediction unitincluded in a current frame that is one of at least one frame forming animage, according to an embodiment. Since features of operation S600 maybe similar features as those of operation S200 of FIG. 2 , detailsthereof are not provided again.

In operation S602, the decoder 120 of the image decoding apparatus 100may determine whether a prediction mode related to a current predictionunit that is one of the at least one prediction unit is an intraprediction mode. According to an embodiment, the decoder 120 maydetermine whether the prediction mode of the current prediction unit isan intra prediction mode, based on syntax indicating the prediction modeof the current prediction unit, the syntax being obtained from abitstream, per pre-determined data unit (for example, the currentprediction unit, a coding unit including the current prediction unit, orthe like).

According to an embodiment, when the prediction mode of the currentprediction unit is an intra prediction mode, the decoder 120 maydetermine a reference region to be referred to by the current predictionunit in operation S604. Since features of operations S604 through S610may be respectively similar features as those of operations S202 through208 of FIG. 2 , details thereof are not provided again.

According to an embodiment, when the prediction mode of the currentprediction unit is an intra prediction mode, the decoder 120 may performimage reconstruction processes after prediction by using a predictionsample value determined according to a result of performing intraprediction of the current prediction unit, without changing the samplevalue included in at least one of the current prediction unit and thereference region, in operation S612. In other words, with respect toperforming, by the image decoding apparatus 100, of various embodimentsfor decoding an image by changing the sample value according to theanalyzing result of the reference region, the decoder 120 may performdecoding processes through the various embodiments described above onlywhen the prediction mode of the current prediction unit is an intraprediction mode.

FIG. 6B illustrates a flowchart of processes of determining whether toanalyze a reference region, based on whether a prediction mode of acurrent prediction unit is one of pre-determined intra prediction modes,according to an embodiment.

In operation S620, the prediction unit determiner 110 of the imagedecoding apparatus 100 may determine at least one prediction unitincluded in a current frame that is one of at least one frame forming animage, according to an embodiment. Since features of operation S620 maybe similar features as those of operation S200 of FIG. 2 , detailsthereof are not provided again.

In operation S622, the decoder 120 of the image decoding apparatus 100may determine whether a prediction mode related to a current predictionunit that is one of the at least one prediction unit is an intraprediction mode. According to an embodiment, the decoder 120 maydetermine whether the prediction mode of the current prediction unit isan intra prediction mode, based on syntax indicating the prediction modeof the current prediction unit, the syntax being obtained from abitstream, per pre-determined data unit (for example, the currentprediction unit, a coding unit including the current prediction unit, orthe like). Since features of operation S622 may be similar features asthose of operation S602 of FIG. 6A, details thereof are not providedagain.

According to an embodiment, when the prediction mode of the currentprediction unit is an intra prediction mode, the decoder 120 maydetermine whether the intra prediction mode of the current predictionunit is one of pre-determined intra prediction modes, in operation S623.According to an embodiment, the pre-determined intra prediction modesmay include at least one of a plurality of intra prediction modes thatmay be used during image decoding processes. According to an embodiment,the pre-determined intra prediction modes may include at least one ofintra prediction modes (for example, a DC mode, a vertical mode, and ahorizontal mode) relatively mostly used from among various intraprediction modes used during compressing processes of a current image.Hereinafter, it is described that the pre-determined prediction mode isa DC mode, for convenience of description.

According to an embodiment, when the intra prediction mode of thecurrent prediction unit is a DC mode, the decoder 120 may determine areference region to be referred to by the current prediction unit, inoperation S624. Since features of operations S624 through S630 may besimilar features as those of operations S202 through S208 of FIG. 2 ,details thereof are not provided again.

According to an embodiment, when the decoder 120 determines that theprediction mode related to the current prediction unit is not an intraprediction mode in operation S622, or when the decoder 120 determinesthat the intra prediction mode related to the current prediction mode isnot a DC mode in operation S623, the decoder 120 may perform imagereconstruction processes after prediction by using a prediction samplevalue determined according to a result of performing intra prediction ofthe current prediction unit, without changing the sample value includedin at least one of the current prediction unit and the reference region,in operation S632. In other words, with respect to performing, by theimage decoding apparatus 100, of various embodiments for decoding animage by changing the sample value according to the analyzing result ofthe reference region, the decoder 120 may perform decoding processesthrough the various embodiments described above only when the predictionmode of the current prediction unit is a DC mode, i.e., a pre-determinedintra prediction mode.

According to an embodiment, even when the prediction mode of the currentprediction unit is a pre-determined intra prediction mode, the decoder120 may change the sample values included in at least one of the currentprediction unit and the reference region, while considering the level towhich the reference region belongs. Accordingly, one of ordinary skillin the art may combine the various embodiments within obvious ranges.

According to an embodiment, the decoder 120 of the image decodingapparatus 100 may obtain, from a bitstream, certain information or aflag indicating whether image decoding processes are performed, theimage decoding processes using the sample value included in at least oneof the current prediction unit and the reference region, the samplevalue being changed based on the analyzing result of the referenceregion. The decoder 120 may determine to perform the various embodimentsdescribed above only when the information of the flag obtained accordingto an embodiment indicates that an image is decoded by using the samplevalue included in at least one of the current prediction unit and thereference region, the sample value being changed based on the analyzingresult of the reference region. In other words, the following imagedecoding processes including processes of determining a reference region(for example, operations S202, S402, S422, S442, S604, or S624) may beperformed only when the obtained information or flag indicates that animage is decoded by using the sample value included in at least one ofthe current prediction unit and the reference region, the sample valuebeing changed based on the analyzing result of the reference region.

FIG. 1B is a block diagram of an image encoding apparatus performing animage encoding method for considering a characteristic of a referenceregion, so as to determine a sample value included in a currentprediction unit, according to an embodiment.

Referring to FIG. 1B, an image encoding apparatus 150 may include aprediction unit determiner 160 for determining a prediction unit that isone of various data units included in a current frame, and an encoder170 encoding an image based on the determined prediction unit. Accordingto an embodiment, operations performed by the prediction unit determiner160 and operations performed by the encoder 170 may be performed bydistinguished software components, or by one piece of hardware (forexample, a processor). Details about operations of the image encodingapparatus 150 are described through various embodiments hereinbelow.

The image encoding method performed by the image encoding apparatus 150may be similar to or reverse of the image decoding method of the imagedecoding apparatus 100 described with reference to FIG. 2 .

FIGS. 3A and 3B illustrate a spatial relationship between a currentprediction unit and a reference region. Since the relationship betweenthe current prediction unit and the reference region, which may be usedby the image encoding apparatus 150 while performing the image encodingmethod, may correspond to a similar relationship as that between thecurrent prediction unit and the reference region, which may be used bythe image decoding apparatus 100, described with reference to FIGS. 3Aand 3B above, details thereof are not provided again.

In relation to FIGS. 4A through 4C, since features of the image encodingapparatus 150 determining a reference region to be one of pre-determinedN levels according to an analyzing result of the reference region, andfurther determining a level to which the reference region belongs byusing at least one pre-determined threshold value may be similar tofeatures of or correspond to features including reverse processes of theimage decoding apparatus 100 described above with reference to FIGS. 4Athrough 4C, details thereof are not provided again.

Since various embodiments (for example, various methods of filtering,smoothing, etc.) usable by the image encoding apparatus 150 to change asample value included in at least one of a reference region and acurrent prediction unit, according to an embodiment, may be methodssimilar to or reverse of the sample value changing method performable bythe image decoding apparatus 100 described above with reference to FIGS.5A and 5B, details thereof are not provided again.

According to an embodiment, since features of the image encodingapparatus 150 determining whether to perform the various embodimentsdescribed above considering whether a prediction mode of a currentprediction unit is an intra prediction mode or a pre-determined intraprediction mode may be similar to features of or correspond to featuresincluding reverse processes of the image decoding apparatus 100described above with reference to FIGS. 6A and 6B, details thereof arenot provided again.

According to an embodiment, even when a prediction mode of a currentprediction unit is a pre-determined intra prediction mode, the encoder170 may change sample values included in at least one of the currentprediction unit and a reference region considering a level to which thereference region belongs. Accordingly, one of ordinary skill in the artmay combine the various embodiments described above within the obviousrange.

According to an embodiment, the encoder 170 of the image encodingapparatus 150 may generate a bitstream including certain information ora flag indicating whether image encoding processes are performed, theimage encoding processes using a sample value included in at least oneof a current prediction unit and a reference region, the sample valuebeing changed based on an analyzing result of the reference region. Theencoder 170 may determine that the various embodiments described aboveare performed only when the information or flag obtained according to anembodiment indicates that an image is encoded by using the sample valueincluded in at least one of the current prediction unit and thereference region, the sample value being changed based on the analyzingresult of the reference region. In other words, the following imageencoding processes including processes of determining the referenceregion may be performed only when the image is encoded by using thesample value included in at least one of the current prediction unit andthe reference region, the sample value being changed based on theanalyzing result of the reference region.

FIG. 7A is a block diagram of an image decoding apparatus for decodingan image by using first information indicating that intra prediction isperformed by using pre-determined at least one prediction mode,according to an embodiment.

According to an embodiment, an image decoding apparatus 700 may includea bitstream receiver 710 and a decoder 720, wherein the bitstreamreceiver 710 receives a bitstream including first information indicatingthat intra prediction is performed by using pre-determined at least oneprediction mode and second information indicating whether intraprediction is to be performed by referring to an intra prediction modeperformed in a block adjacent to a current prediction mode, and thedecoder 720 decodes an image based on the first information and thesecond information obtained from the bitstream. A method of the decoder720 performing decoding by using the first information and the secondinformation will be described later through various embodiments.

According to an embodiment, the image decoding apparatus 700 may obtain,from the bitstream, at least one of the first information and the secondinformation per certain data unit. The first information and the secondinformation are information related to a prediction mode, and thedecoder 720 may obtain at least one of the first information and thesecond information from the bitstream, per current prediction unit.According to another embodiment, the decoder 720 may obtain, from thebitstream, at least one of the first information and the secondinformation per certain data unit including the current prediction unit(for example, a coding unit, a largest coding unit, a slice, or the likeincluding the current prediction unit). The decoder 120 may performdecoding through prediction processes in the current prediction unit,based on at least one of the obtained first information and secondinformation.

FIG. 8 is a flowchart of an image decoding apparatus decoding an imageby obtaining first information and second information from a bitstream,according to an embodiment.

In operation S800, the decoder 720 of the image decoding apparatus 700may obtain, from the bitstream received by the bitstream receiver 710,the first information indicating that at least one prediction modepre-determined among a plurality of intra prediction modes is used,according to an embodiment.

In operation S802, the decoder 720 may determine whether the firstinformation obtained in operation S800 indicates that an intraprediction mode is performed according to the pre-determined at leastone prediction mode.

According to an embodiment, the decoder 720 may perform prediction byusing one of the pre-determined at least one prediction mode, in acurrent prediction unit. According to an embodiment, the pre-determinedat least one prediction mode may include at least one of intraprediction modes (for example, a DC mode, a vertical mode, and ahorizontal mode) relatively mostly used from among various intraprediction modes used during compressing processes of a current image.

According to an embodiment, the first information obtained from thebitstream may have different bit numbers according to the number ofpre-determined at least one prediction mode. For example, when thepre-determined at least one prediction mode includes a DC mode and aplanar mode, the first information may be expressed in one bit. Asanother example, when the pre-determined at least one prediction modeincludes a DC mode, a planar mode, a vertical mode, and a horizontalmode, the first information may be expressed in two bits.

According to an embodiment, when the obtained first informationindicates that the intra prediction mode is performed according to thepre-determined at least one prediction mode in operation S802, thedecoder 720 may decode an image by performing intra prediction accordingto the pre-determined at least one prediction mode indicated by thefirst information, in operation S804.

According to an embodiment, the decoder 702 may determine, based on thefirst information, whether the intra prediction mode is to be performedaccording to the pre-determined at least one prediction mode, andfurthermore, perform prediction based on the intra prediction modeindicated by the first information. Table 1 below shows whether thedecoder 120 is to perform the intra prediction mode according to the atleast one prediction mode based on the first information, and the intraprediction mode performed in the current prediction unit, according toan embodiment.

TABLE 1 Whether intra prediction mode is Intra First to be performedaccording to prediction mode information at least one prediction mode tobe performed  0b X —  1b ○ DC mode 00b X — 01b ○ DC mode 10b ○ Planarmode 11b ○ Vertical mode

However, features of the first information shown in Table 1 are anembodiment for describing features that the decoder 720 may determinewhether the intra prediction mode is to be performed according to the atleast one prediction mode by using the first information and determinethe intra prediction mode to be performed in the current predictionunit, and thus the features of the first information are not limited toTable 1.

According to an embodiment, the bit number of first information maycorrespond to a bit number of a fixed length of a pre-determined N-bit(n-bit fixed length coding), and according to another embodiment, thefirst information may have a variable bit number when decoding processesusing the first information is defined to be performed hierarchically(for example, variable length coding according to an occurrencefrequency).

An image decoding method performable by the decoder 720 in operationS804 may include various methods of prediction, inverse transformation,deblocking filtering method, etc, which are performable by using theintra prediction mode determined based on the first information, and maybe easily combined with other conventional technologies by one ofordinary skill in the art.

When the obtained first information does not indicate that the intraprediction mode is performed according to the pre-determined at leastone prediction mode in operation S802, the decoder 720 may obtain, fromthe bitstream, second information indicating whether the intraprediction mode of the current prediction unit is to be determined byreferring to an intra prediction mode performed in a block adjacent tothe current prediction unit, in operation S806. According to anembodiment, when the first information does not indicate that the intraprediction mode is performed according to the at least one predictionmode, the decoder 120 may determine a prediction mode of the currentprediction unit by using a most probable mode (MPM). When it isdetermined that MPM is used based on the second information, the imagedecoding apparatus 700 may obtain, from the bitstream, an index (forexample, mpm_idx) indicating one of a plurality of MPMs. The decoder 120may perform intra prediction in the current prediction unit, accordingto the intra prediction mode that may be determined based on the indexindicating one of the MPMs.

In operation S808, the decoder 720 may decode an image based on thesecond information indicating whether the intra prediction is to beperformed by referring to the intra prediction mode performed in theblock adjacent to the current prediction unit (for example, a blockadjacent to the left or top of the current prediction unit), accordingto an embodiment. According to an embodiment, when the secondinformation indicates that the intra prediction is performed byreferring to the intra prediction mode performed in the block adjacentto the current prediction unit (for example, the block adjacent to theleft or top of the current prediction unit), the decoder 720 maydetermine the intra prediction mode of the current prediction unit,based on the intra prediction mode of the block adjacent to the currentprediction unit, according to MPM. The decoder 720 may decode the imageby performing prediction based on the determined intra prediction mode.

According to an embodiment, when the second information does notindicate that the intra prediction is to be performed by referring tothe intra prediction mode performed in the block adjacent to the currentprediction unit (for example, the block adjacent to the left or top ofthe current prediction unit), the decoder 720 may determine theprediction mode of the current prediction unit, based on the intraprediction mode indicating certain information (for example,rem_intra_luma_pred_mode) obtained from the bitstream, without usingMPM. According to an embodiment, the decoder 720 may determine the intraprediction mode of the current prediction unit by using an intraprediction mode directly indicated by the certain information, and inthis case, the intra prediction mode of the block adjacent to thecurrent prediction unit may not be referred to.

However, the various embodiments of the image decoding apparatus 700decoding an image according to MPM described above should not beinterpreted limitedly to the above embodiments but should be interpretedthat features of various MPMs may be combined and used within the rangeobvious to one of ordinary skill in the art. Details about features ofconventional MPMs will not be provided.

FIG. 9 is a flowchart of a method by which the image decoding apparatus700 determines one of intra prediction modes excluding thepre-determined at least one prediction mode related to the firstinformation, by referring to an intra prediction mode of a neighboringblock, according to an embodiment.

Since features of operations S900 to S904 and S908 may correspond tosimilar features as those of operations S800 to S804 and S808 of FIG. 8, details thereof are not provided again.

When it is determined that the first information does not indicate thatthe intra prediction mode is performed according to the pre-determinedat least one prediction mode in operation S902, the decoder 720 mayobtain, from the bitstream, the second information indicating whetherthe intra prediction is to be performed by referring to an intraprediction mode performed in the block adjacent to the currentprediction unit, among remaining intra prediction modes excluding thepre-determined at least one intra prediction mode, in operation S906,according to an embodiment.

In other words, when the first information does not indicate that theintra prediction mode is performed according to the pre-determined atleast one prediction mode, the decoder 120 may determine the intraprediction mode of the current prediction unit according to MPM, whereinintra prediction modes usable according to one of MPMs may not includethe pre-determined at least one prediction mode related to the firstinformation. For example, when the pre-determined at least oneprediction mode related to the first information is a planar mode and aDC mode, the intra prediction mode indicatable in MPM may be one of theremaining intra prediction modes (for example, intra prediction modeshaving directivity (modes 2, 3, 4, and so on) excluding the planar mode(mode 0) and the DC mode (mode 1).

According to another embodiment, when the decoder 120 determines theintra prediction mode of the current prediction unit according to MPM,the intra prediction modes usable according to one of MPMs may includethe pre-determined at least one prediction mode related to the firstinformation. In other words, when the pre-determined at least oneprediction mode related to the first information is a planar mode (mode0) and a DC mode (mode 1), the intra prediction mode indicatable in MPMmay be one of intra prediction modes (for example, a planar mode, a DCmode, and intra prediction modes having directivity (modes 2, 3, 4, andso on) including the planar mode and the DC mode.

According to an embodiment, when the decoder 120 determines the intraprediction mode of the current prediction unit according to MPM, theintra prediction modes usable according to one of MPMs may not includesome of the pre-determined at least one prediction mode related to thefirst information. In this case, it should be limitedly interpreted thatthe pre-determined at least one prediction mode includes a plurality ofintra prediction modes. According to an embodiment, when thepre-determined at least one prediction mode related to the firstinformation is a planar mode, a DC mode, a vertical mode, and ahorizontal mode, the intra prediction mode indictable by MPM may be oneof the remaining intra prediction modes (for example, a planar mode; aDC mode; and intra prediction modes excluding a vertical mode and ahorizontal mode among intra prediction modes having directivity)excluding the vertical mode and the horizontal mode.

According to an embodiment, when the intra prediction mode of thecurrent prediction unit is determined according to MPM, intra predictionmodes usable according to one of MPMs may include new intra predictionmodes instead of the pre-determined at least one prediction mode relatedto the first information.

However, features of the pre-determined at least one prediction moderelated to the first information correspond to an embodiment forcomparison of an intra prediction mode usable in MPM, and thus shouldnot be interpreted limitedly to the above embodiments, and is broadlyinterpreted to include at least one of a plurality of intra predictionmodes usable during image decoding processes.

FIG. 7B is a block diagram of an image encoding apparatus 750 forencoding an image by using first information indicating that intraprediction is performed by using pre-determined at least one predictionmode, according to an embodiment.

According to an embodiment, the image decoding apparatus 700 may includea bitstream generator 760 and an encoder 770, wherein the bitstreamgenerator 760 generates a bitstream including first informationindicating that intra prediction is performed by using pre-determined atleast one prediction mode and second information indicating whetherintra prediction is to be performed by referring to an intra predictionmode performed in a block adjacent to a current prediction unit, and theencoder 770 encodes an image by performing intra prediction by using thepre-determined at least one prediction mode or by referring to the intraprediction mode performed in the block adjacent to the currentprediction unit.

Since features of an image encoding method performed by the imageencoding apparatus 750 may be features of similar or reverse processesof the image decoding method performed by the image decoding apparatus700 described with reference to FIGS. 7A, 8, and 9 , details thereof arenot provided.

Hereinafter, a method by which the image decoding apparatus 100according to an embodiment determines a data unit usable while decodingan image will be described with reference to FIGS. 10 through 23 .Operations of the image encoding apparatus 150 may be similar to orreverse of various embodiments of operations of the image decodingapparatus 100.

It should be understood that processes of the image decoding apparatus100 decoding an image in FIGS. 10 through 23 may also be performed bythe image decoding apparatus 700 of FIG. 7A, according to an embodiment.

FIG. 10 illustrates processes of determining at least one coding unit asthe image decoding apparatus 100 splits a current coding unit, accordingto an embodiment.

According to an embodiment, the image decoding apparatus 100 maydetermine a shape of a coding unit by using block shape information anddetermine a shape into which a coding unit is split by using split shapeinformation. In other words, a split method of a coding unit, which isindicated by the split shape information, may be determined based on ablock shape indicated by the block shape information used by the imagedecoding apparatus 100.

According to an embodiment, the image decoding apparatus 100 may useblock shape information indicating that a current coding unit has asquare shape. For example, the image decoding apparatus 100 maydetermine, according to split shape information, whether to not split asquare coding unit, to split the square coding unit vertically, to splitthe square coding unit horizontally, or to split the square coding unitinto four coding units. Referring to FIG. 10 , when block shapeinformation of a current coding unit 1000 indicates a square shape, thedecoder 120 may not split a coding unit 1010 a having the same size asthe current coding unit 1000 according to split shape informationindicating non-split, or determine coding units 1010 b, 1010 c, or 1010d based on split shape information indicating a certain split method.

Referring to FIG. 10 , the image decoding apparatus 100 may determinetwo coding units 1010 b by splitting the current coding unit 1000 in avertical direction based on split shape information indicating a splitin a vertical direction, according to an embodiment. The image decodingapparatus 100 may determine two coding units 1010 c by splitting thecurrent coding unit 1000 in a horizontal direction based on split shapeinformation indicating a split in a horizontal direction. The imagedecoding apparatus 100 may determine four coding units 1010 d bysplitting the current coding unit 1000 in vertical and horizontaldirections based on split shape information indicating splitting invertical and horizontal directions. However, a split shape into which asquare coding unit may be split is not limited to the above shapes andmay include any shape indicatable by split shape information. Certainsplit shapes into which a square coding unit are split will now bedescribed in detail through various embodiments.

FIG. 11 illustrates processes of determining at least one coding unitwhen the image decoding apparatus 100 splits a coding unit having anon-square shape, according to an embodiment.

According to an embodiment, the image decoding apparatus 100 may useblock shape information indicating that a current coding unit has anon-square shape. The image decoding apparatus 100 may determine,according to split shape information, whether to not split thenon-square current coding unit or to split the non-square current codingunit via a certain method. Referring to FIG. 11 , when block shapeinformation of a current coding unit 1100 or 1150 indicates a non-squareshape, the image decoding apparatus 100 may not split coding units 1110or 1160 having the same size as the current coding unit 1100 or 1150according to split shape information indicating non-split, or determinecoding units 1120 a, 1120 b, 1130 a, 1130 b, 1130 c, 1170 a, 1170 b,1180 a, 1180 b, and 1180 c based on split shape information indicating acertain split method. A certain split method of splitting a non-squarecoding unit will now be described in detail through various embodiments.

According to an embodiment, the image decoding apparatus 100 maydetermine a shape into which a coding unit is split by using split shapeinformation, and in this case, the split shape information may indicatethe number of at least one coding unit generated as the coding unit issplit. Referring to FIG. 11 , when split shape information indicatesthat the current coding unit 1100 or 1150 is split into two codingunits, the image decoding apparatus 100 may determine two coding units1120 a and 1120 b or 1170 a and 1170 b included in the current codingunit 1100 or 1150 by splitting the current coding unit 1100 or 1150based on the split shape information.

According to an embodiment, when the image decoding apparatus 100 splitsthe current coding unit 1100 or 1150 having a non-square shape based onsplit shape information, the image decoding apparatus 100 may split thecurrent coding unit 1100 or 1150 considering locations of long sides ofthe current coding unit 1100 or 1150 having a non-square shape. Forexample, the image decoding apparatus 100 may determine a plurality ofcoding units by splitting the current coding unit 1100 or 1150 in adirection of splitting the long sides of the current coding unit 1100 or1150 considering a shape of the current coding unit 1100 or 1150.

According to an embodiment, when split shape information indicates thata coding unit is split into an odd number of blocks, the image decodingapparatus 100 may determine the odd number of coding units included inthe current coding unit 1100 or 1150. For example, when split shapeinformation indicates that the current coding unit 1100 or 1150 is splitinto three coding units, the image decoding apparatus 100 may split thecurrent coding unit 1100 or 1150 into three coding units 1130 a through1130 c or 1180 a through 1180 c. According to an embodiment, the imagedecoding apparatus 100 may determine the odd number of coding unitsincluded in the current coding unit 1100 or 1150, and the sizes of thedetermined coding units may not be all the same. For example, the sizeof coding unit 1130 b or 1180 b from among the determined odd number ofcoding units 1130 a through 1130 c or 1180 a through 1180 c may bedifferent from the sizes of coding units 1130 a and 1130 c or 1180 a and1180 c. In other words, coding units that may be determined when thecurrent coding unit 1100 or 1150 is split may have a plurality of typesof sizes, and in some cases, the coding units 1130 a through 1130 c or1180 a through 1180 c may have different sizes.

According to an embodiment, when split shape information indicates thata coding unit is split into an odd number of blocks, the image decodingapparatus 100 may determine the odd number of coding units included inthe current coding unit 1100 or 1150, and in addition, may set a certainlimit on at least one coding unit from among the odd number of codingunits generated via splitting. Referring to FIG. 11 , the image decodingapparatus 100 may differentiate decoding processes performed on thecoding unit 1130 b or 1180 b located at the center from among the threecoding units 1130 a through 1130 c or 1180 a through 1180 c generated asthe current coding unit 1100 or 1150 is split from the other codingunits 1130 a and 1130 c or 1180 a and 1180 c. For example, the imagedecoding apparatus 100 may limit the coding unit 1130 b or 1180 blocated at the center to be no longer split unlike the other codingunits 1130 a and 1130 c or 1180 a and 1180 c, or to be split only acertain number of times.

FIG. 12 illustrates processes of the image decoding apparatus 100splitting a coding unit, based on at least one of a block shapeinformation and split shape information, according to an embodiment.

According to an embodiment, the image decoding apparatus 100 maydetermine that a first coding unit 1200 having a square shape is splitor not split into coding units, based on at least one of block shapeinformation and split shape information. According to an embodiment,when split shape information indicates that the first coding unit 1200is split in a horizontal direction, the image decoding apparatus 100 maydetermine a second coding unit 1210 by splitting the first coding unit1200 in a horizontal direction. A first coding unit, a second codingunit, and a third coding unit used according to an embodiment are termsused to indicate a relation between before and after splitting a codingunit. For example, a second coding unit may be determined by splitting afirst coding unit, and a third coding unit may be determined bysplitting a second coding unit. Hereinafter, it will be understood thatrelations between first through third coding units are in accordancewith the features described above.

According to an embodiment, the image decoding apparatus 100 maydetermine that the determined second coding unit 1210 is split or notsplit into coding units based on at least one of block shape informationand split shape information. Referring to FIG. 12 , the image decodingapparatus 100 may split the second coding unit 1210, which has anon-square shape and is determined by splitting the first coding unit1200, into at least one third coding unit 1210 a, 1220 b, 1220 c, or1220 d, or may not split the second coding unit 1210, based on at leastone of block shape information and split shape information. The imagedecoding apparatus 100 may obtain at least one of the block shapeinformation and the split shape information, and obtain a plurality ofsecond coding units (for example, the second coding units 1210) havingvarious shapes by splitting the first coding unit 1200 based on at leastone of the obtained block shape information and split shape information,wherein the second coding unit 1210 may be split according to a methodof splitting the first coding unit 1200 based on at least one of theblock shape information and the split shape information. According to anembodiment, when the first coding unit 1200 is split into the secondcoding units 1210 based on at least one of block shape information andsplit shape information with respect to the first coding unit 1200, thesecond coding unit 1210 may also be split into third coding units (forexample, the third coding units 1220 a through 1220 d) based on at leastone of block shape information and split shape information with respectto the second coding unit 1210. In other words, a coding unit may berecursively split based on at least one of split shape information andblock shape information related to each coding unit. Accordingly, asquare coding unit may be determined from a non-square coding unit, andsuch a square coding unit may be recursively split such that anon-square coding unit is determined. Referring to FIG. 12 , a certaincoding unit (for example, a coding unit located at the center or asquare coding unit) from among the odd number of third coding units 1220b through 1220 d determined when the second coding unit 1210 having anon-square shape is split may be recursively split. According to anembodiment, the third coding unit 1220 c having a square shape fromamong the third coding units 1220 b through 1220 d may be split in ahorizontal direction into a plurality of fourth coding units. A fourthcoding unit having a non-square shape from among the plurality of fourthcoding units may again be split into a plurality of coding units. Forexample, the fourth coding unit having a non-square shape may be splitinto an odd number of coding units.

A method that may be used to recursively split a coding unit will bedescribed below through various embodiments.

According to an embodiment, the image decoding apparatus 100 maydetermine that each of the third coding units 1220 a through 1220 d issplit into coding units or that the second coding unit 1210 is notsplit, based on at least one of block shape information and split shapeinformation. The image decoding apparatus 100 may split the secondcoding unit 1210 having a non-square shape into the odd number of thirdcoding units 1220 b through 1220 d, according to an embodiment. Theimage decoding apparatus 100 may set a certain limit on a certain thirdcoding unit from among the third coding units 1220 b through 1220 d. Forexample, the image decoding apparatus 100 may limit that the thirdcoding unit 1220 c located at the center of the third coding units 1220b through 1220 d is no longer split, or is split into a settable numberof times. Referring to FIG. 12 , the image decoding apparatus 100 maylimit that the third coding unit 1220 c located at the center of thethird coding units 1220 b through 1220 d included in the second codingunit 1210 having a non-square shape is no longer split, is split into acertain split shape (for example, is split into four coding units orsplit into shapes corresponding to those into which the second codingunit 1210 is split), or is split only a certain number of times (forexample, split only n times wherein n>0). However, such limits on thethird coding unit 1220 c located at the center are only examples andshould not be interpreted as being limited by those examples, but shouldbe interpreted as including various limits as long as the third codingunit 1220 c located at the center is decoded differently from the otherthird coding units 1220 b and 1220 d.

According to an embodiment, the image decoding apparatus 100 may obtainat least one of block shape information and split shape information usedto split a current coding unit from a certain location in the currentcoding unit.

FIG. 13 illustrates a method of determining, by the image decodingapparatus 100, a certain coding unit from among an odd number of codingunits, according to an embodiment. Referring to FIG. 13 , at least oneof block shape information and split shape information of a currentcoding unit 1300 may be obtained from a sample at a certain location(for example, a sample 1340 located at the center) from among aplurality of samples included in the current coding unit 1300. However,the certain location in the current coding unit 1300 from which at leastone of block shape information and split shape information is obtainedis not limited to the center location shown in FIG. 13 , but may be anylocation (for example, an uppermost location, a lowermost location, aleft location, a right location, an upper left location, a lower leftlocation, an upper right location, or a lower right location) includedin the current coding unit 1300. The image decoding apparatus 100 maydetermine that a current coding unit is split into coding units havingvarious shapes and sizes or is not split by obtaining at least one ofblock shape information and split shape information from a certainlocation.

According to an embodiment, the image decoding apparatus 100 may selectone coding unit when a current coding unit is split into a certainnumber of coding units. A method of selecting one of a plurality ofcoding units may vary, and details thereof will be described belowthrough various embodiments.

According to an embodiment, the image decoding apparatus 100 may split acurrent coding unit into a plurality of coding units and determine acoding unit at a certain location.

FIG. 13 illustrates a method of determining, by the image decodingapparatus 100, a coding unit at a certain location from among an oddnumber of coding units, according to an embodiment.

According to an embodiment, the image decoding apparatus 100 may useinformation indicating a location of each of the odd number of codingunits so as to determine a coding unit located at the center from amongthe odd number of coding units. Referring to FIG. 13 , the imagedecoding apparatus 100 may determine the odd number of coding units 1320a through 1320 c by splitting the current coding unit 1300. The imagedecoding apparatus 100 may determine the center coding unit 1320 b byusing information about the locations of the odd number of coding units1320 a through 1320 c. For example, the image decoding apparatus 100 maydetermine the coding unit 1320 b located at the center by determiningthe locations of the coding units 1320 a through 1320 b based oninformation indicating locations of certain samples included in thecoding units 1320 a through 1320 c. In detail, the image decodingapparatus 100 may determine the coding unit 1320 b located at the centerby determining the locations of the coding units 1320 a through 1320 cbased on information indicating locations of upper left samples 1330 athrough 1330 c of the coding units 1320 a through 1320 c.

According to an embodiment, the information indicating the locations ofthe upper left samples 1330 a through 1330 c included in the codingunits 1320 a through 1320 c respectively may include information about alocation or coordinates of the coding units 1320 a through 1320 c in apicture. According to an embodiment, the information indicating thelocations of the upper left samples 1330 a through 1330 c included inthe coding units 1320 a through 1320 c respectively may includeinformation indicating widths or heights of the coding units 1320 athrough 1320 c included in the current coding unit 1300, and such widthsor heights may correspond to information indicating differences betweencoordinates of the coding units 1320 a through 1320 c in a picture. Inother words, the image decoding apparatus 100 may determine the codingunit 1320 b located at the center by directly using the informationabout the locations or coordinates of the coding units 1320 a through1320 c in a picture or by using information about the widths or heightsof the coding units 1320 a through 1320 c corresponding to thedifferences between coordinates.

According to an embodiment, the information indicating the location ofthe upper left sample 1330 a of the upper coding unit 1320 a mayindicate (xa, ya) coordinates, the information indicating the locationof the upper left sample 1330 b of the center coding unit 1320 b mayindicate (xb, yb) coordinates, and the information indicating thelocation of the upper left sample 1330 c of the lower coding unit 1320 cmay indicate (xc, yc) coordinates. The image decoding apparatus 100 maydetermine the center coding unit 1320 b by using the coordinates of theupper left samples 1330 a through 1330 c respectively included in thecoding units 1320 a through 1320 c. For example, when the coordinates ofthe upper left samples 1330 a through 1330 c are arranged in anascending order or descending order, the coding unit 1320 b includingthe coordinates (xb, yb) of the sample 1330 b located at the center maybe determined as a coding unit located at the center from among thecoding units 1320 a through 1320 c determined when the current codingunit 1300 is split. However, coordinates indicating the locations of theupper left samples 1330 a through 1330 c may be coordinates indicatingabsolute locations in a picture, and in addition, (dxb, dyb)coordinates, i.e., information indicating a relative location of theupper left sample 1330 b of the center coding unit 1320 b, and (dxc,dyc) coordinates, i.e., information indicating a relative location ofthe upper left sample 1330 c of the lower coding unit 1320 c, may beused based on the location of the upper left sample 1330 a of the uppercoding unit 1320 a. Also, a method of determining a coding unit at acertain location by using, as information indicating locations ofsamples included in coding units, coordinates of the samples is notlimited to the above, and various arithmetic methods capable of usingcoordinates of samples may be used.

According to an embodiment, the image decoding apparatus 100 may splitthe current coding unit 1300 into the plurality of coding units 1320 athrough 1320 c and select a coding unit from the coding units 1320 athrough 1320 c according to a certain standard. For example, the imagedecoding apparatus 100 may select the coding unit 1320 b having adifferent size from among the coding units 1320 a through 1320 c.

According to an embodiment, the image decoding apparatus 100 maydetermine widths or heights of the coding units 1320 a through 1320 c byrespectively using the (xa, ya) coordinates, i.e., the informationindicating the location of the upper left sample 1330 a of the uppercoding unit 1320 a, the (xb, yb) coordinates, i.e., the informationindicating the location of the upper left sample 1330 b of the centercoding unit 1320 b, and the (xc, yc) coordinates, i.e., the informationindicating the location of the upper left sample 1330 c of the lowercoding unit 1320 c. The image decoding apparatus 100 may determine thesizes of the coding units 1320 a through 1320 c by respectively usingthe coordinates (xa, ya), (xb, yb), and (xc, yc) indicating thelocations of the coding units 1320 a through 1320 c.

According to an embodiment, the image decoding apparatus 100 maydetermine the width of the upper coding unit 1320 a to be xb−xa and theheight to be yb−ya. According to an embodiment, the image decodingapparatus 100 may determine the width of the center coding unit 1320 bto be xc−xb and the height to be yc−yb. According to an embodiment, theimage decoding apparatus 100 may determine the width or height of thelower coding unit 1320 c by using the width and height of the currentcoding unit 1300 and the widths and heights of the upper coding unit1320 a and the center coding unit 1320 b. The image decoding apparatus100 may determine a coding unit having a different size from othercoding units based on the determined widths and heights of the codingunits 1320 a through 1320 c. Referring to FIG. 13 , the image decodingapparatus 100 may determine the center coding unit 1320 b having a sizedifferent from those of the upper coding unit 1320 a and the lowercoding unit 1320 c as a coding unit at a certain location. However,processes of the image decoding apparatus 100 determining a coding unithaving a different size from other coding units are only an example ofdetermining a coding unit at a certain location by using sizes of codingunits determined based on sample coordinates, and thus various processesof determining a coding unit at a certain location by comparing sizes ofcoding units determined according to certain sample coordinates may beused.

However, a location of a sample considered to determine a location of acoding unit is not limited to the upper left as described above, andinformation about a location of an arbitrary sample included in a codingunit may be used.

According to an embodiment, the image decoding apparatus 100 may selecta coding unit at a certain location from among an odd number of codingunits determined when a current coding unit is split, while consideringa shape of the current coding unit. For example, when the current codingunit has a non-square shape in which a width is longer than a height,the image decoding apparatus 100 may determine a coding unit at acertain location in a horizontal direction. In other words, the imagedecoding apparatus 100 may determine one of the coding units having adifferent location in the horizontal direction and set a limit on theone coding unit. When the current coding unit has a non-square shape inwhich a height is longer than a width, the image decoding apparatus 100may determine a coding unit at a certain location in a verticaldirection. In other words, the image decoding apparatus 100 maydetermine one of the coding units having a different location in thevertical direction and set a limit on the one coding unit.

According to an embodiment, the image decoding apparatus 100 may useinformation indicating a location of each of an even number of codingunits so as to determine a coding unit at a certain location from amongthe even number of coding units. The image decoding apparatus 100 maydetermine the even number of coding units by splitting a current codingunit and determine the coding unit at the certain location by usinginformation about the locations of the even number of coding units.Detailed processes thereof may correspond to those of determining acoding unit at a certain location (for example, a center location) fromamong an odd number of coding units described in FIG. 13 , and thusdetails thereof are not provided again.

According to an embodiment, when a current coding unit having anon-square shape is split into a plurality of coding units, certaininformation about a coding unit at a certain location during splittingprocesses may be used to determine the coding unit at the certainlocation from among the plurality of coding units. For example, theimage decoding apparatus 100 may use at least one of block shapeinformation and split shape information stored in a sample included in acenter coding unit during splitting processes so as to determine acoding unit located at the center from among a plurality of coding unitsobtained by splitting a current coding unit.

Referring to FIG. 13 , the image decoding apparatus 100 may split thecurrent coding unit 1300 into the plurality of coding units 1320 athrough 1320 c based on at least one of block shape information andsplit shape information and determine the coding unit 1320 b located atthe center from among the plurality of coding units 1320 a through 1320c. In addition, the image decoding apparatus 100 may determine thecoding unit 1320 b located at the center considering a location fromwhich at least one of the block shape information and the split shapeinformation is obtained. In other words, at least one of the block shapeinformation and the split shape information of the current coding unit1300 may be obtained from the sample 1340 located at the center of thecurrent coding unit 1300, and when the current coding unit 1300 is splitinto the plurality of coding units 1320 a through 1320 c based on atleast one of the block shape information and the split shapeinformation, the coding unit 1320 b including the sample 1340 may bedetermined as a coding unit located at the center. However, informationused to determine a coding unit located at the center is not limited toat least one of the block shape information and the split shapeinformation, and various types of information may be used whiledetermining a coding unit located at the center.

According to an embodiment, certain information for identifying a codingunit at a certain location may be obtained from a certain sampleincluded in a coding unit to be determined. Referring to FIG. 13 , theimage decoding apparatus 100 may use at least one of block shapeinformation and split shape information obtained from a sample at acertain location in the current coding unit 1300 (for example, a samplelocated at the center of the current coding unit 1300), so as todetermine a coding unit at a certain location (for example, a codingunit located at the center from among a plurality of coding units) fromamong the plurality of coding units 1320 a through 1320 c determinedwhen the current coding unit 1300 is split. In other words, the imagedecoding apparatus 100 may determine the sample at the certain locationconsidering a block shape of the current coding unit 1300 and determineand set a certain limit on the coding unit 1320 b including a samplefrom which certain information (for example, at least one of block shapeinformation and split shape information) is obtainable, from among theplurality of coding units 1320 a through 1320 c determined when thecurrent coding unit 1300 is split. Referring to FIG. 13 , according toan embodiment, the image decoding apparatus 100 may determine, as asample from which certain information is obtainable, the sample 1340located at the center of the current coding unit 1300 and set a certainlimit on the coding unit 1320 b including such a sample 1340 duringdecoding processes. However, a location of a sample from which certaininformation is obtainable is not limited to the above and may be asample at an arbitrary location included in the coding unit 1320 bdetermined to set a limit.

According to an embodiment, a location of a sample from which certaininformation is obtainable may be determined according to a shape of thecurrent coding unit 1300. According to an embodiment, block shapeinformation may determine whether a shape of a current coding unit issquare or non-square and determine a location of a sample from whichcertain information is obtainable according to the shape. For example,the image decoding apparatus 100 may determine, as a sample from whichcertain information is obtainable, a sample located on a boundary ofsplitting at least one of a width and a height of a current coding unitinto halves by using at least one of information about the width of thecurrent coding unit and information about the height of the currentcoding unit. As another example, when block shape information related toa current coding unit indicates a non-square shape, the image decodingapparatus 100 may determine, as a sample from which certain informationis obtainable, one of samples adjacent to a boundary of splitting longsides of the current coding unit into halves.

According to an embodiment, when a current coding unit is split into aplurality of coding units, the image decoding apparatus 100 may use atleast one of block shape information and split shape information so asto determine a coding unit at a certain location from among theplurality of coding units. According to an embodiment, the imagedecoding apparatus 100 may obtain at least one of block shapeinformation and split shape information from a sample at a certainlocation included in a coding unit, and may split a plurality of codingunits generated as a current coding unit is split by using at least oneof the split shape information and the block shape information obtainedfrom the sample at the certain location included in each of theplurality of coding units. In other words, a coding unit may berecursively split by using at least one of block shape information andsplit shape information obtained from a sample at a certain locationincluded in each coding unit. Since processes of recursively splitting acoding unit have been described above with reference to FIG. 12 ,details thereof are not provided again.

According to an embodiment, the image decoding apparatus 100 maydetermine at least one coding unit by splitting a current coding unitand determine an order of decoding the at least one coding unitaccording to a certain block (for example, the current coding unit).

FIG. 14 illustrates an order of processing a plurality of coding unitswhen the plurality of coding units are determined when the imagedecoding apparatus 100 splits a current coding unit, according to anembodiment.

According to an embodiment, the image decoding apparatus 100 maydetermine second coding units 1410 a and 1410 b by splitting a firstcoding unit 1400 in a vertical direction, determine second coding units1430 a and 1430 b by splitting the first coding unit 1400 in ahorizontal direction, or determine second coding units 1450 a through1450 d by splitting the first coding unit 140 in horizontal and verticaldirections, according to block shape information and split shapeinformation.

Referring to FIG. 14 , the image decoding apparatus 100 may determinethe second coding units 1410 a and 1410 b, which are determined bysplitting the first coding unit 1400 in the vertical direction, to beprocessed in a horizontal direction 1410 c. The image decoding apparatus100 may determine the second coding units 1430 a and 1430 b, which aredetermined by splitting the first coding unit 1400 in the horizontaldirection, to be processed in a vertical direction 1430 c. The imagedecoding apparatus 100 may determine the second coding units 1450 athrough 1450 d, which are determined by splitting the first coding unit1400 in the vertical and horizontal directions, according to a certainorder in which coding units located in one row is processed and thencoding units located in a next row is processed (for example, a rasterscan order or a z-scan order 1450 e).

According to an embodiment, the image decoding apparatus 100 mayrecursively split coding units. Referring to FIG. 14 , the imagedecoding apparatus 100 may determine the plurality of second codingunits 1410 a and 1410 b, 1430 a and 1430 b, or 1450 a through 1450 d bysplitting the first coding unit 1400, and recursively split each of theplurality of second coding units 1410 a and 1410 b, 1430 a and 1430 b,or 1450 a through 1450 d. A method of splitting the plurality of secondcoding units 1410 a and 1410 b, 1430 a and 1430 b, or 1450 a through1450 d may correspond to a method of splitting the first coding unit1400. Accordingly, each of the plurality of second coding units 1410 aand 1410 b, 1430 a and 1430 b, or 1450 a through 1450 d may beindependently split into a plurality of coding units. Referring to FIG.14 , the image decoding apparatus 100 may determine the second codingunits 1410 a and 1410 b by splitting the first coding unit 1400 in thevertical direction, and in addition, determine that each of the secondcoding units 1410 a and 1410 b is independently split or not split.

According to an embodiment, the image decoding apparatus 100 may splitthe second coding unit 1410 a at the left in a horizontal direction intothird coding units 1420 a and 1420 b and may not split the second codingunit 1410 b at the right.

According to an embodiment, an order of processing coding units may bedetermined based on split processes of coding units. In other words, anorder of processing coding units that are split may be determined basedon an order of processing coding units before being split. The imagedecoding apparatus 100 may determine an order of processing the thirdcoding units 1420 a and 1420 b determined when the second coding unit1410 a at the left is split independently from the second coding unit1410 b at the right. Since the third coding units 1420 a and 1420 b aredetermined when the second coding unit 1410 a at the left is split in ahorizontal direction, the third coding units 1420 a and 1420 b may beprocessed in a vertical direction 1420 c. Also, since an order ofprocessing the second coding unit 1410 a at the left and the secondcoding unit 1410 b at the right corresponds to the horizontal direction1410 c, the second coding unit 1410 b at the right may be processedafter the third coding units 1420 a and 1420 b included in the secondcoding unit 1410 a at the left are processed in the vertical direction1420 c. The above descriptions are related processes of determining anorder of processing coding units according to coding units before beingsplit, but such processes are not limited to the above embodiments, andany method of independently processing, in a certain order, coding unitssplit into various shapes may be used.

FIG. 15 illustrates processes of determining that a current coding unitis split into an odd number of coding units when coding units are notprocessable in a certain order by the image decoding apparatus 100,according to an embodiment.

According to an embodiment, the image decoding apparatus 100 maydetermine that a current coding unit is split into an odd number ofcoding units based on obtained block shape information and split shapeinformation. Referring to FIG. 15 , a first coding unit 1500 having asquare shape may be split into second coding units 1510 a and 1510 bhaving a non-square shape, and the second coding units 1510 a and 1510 bmay be independently respectively split into third coding units 1520 aand 1520 b, and 1520 c through 1520 e. According to an embodiment, theimage decoding apparatus 100 may split the second coding unit 1510 a atthe left from among the second coding units 1510 a and 1510 b into ahorizontal direction to determine the plurality of third coding units1520 a and 1520 b, and split the second coding unit 1510 b at the rightinto the odd number of third coding units 1520 c through 1520 e.

According to an embodiment, the image decoding apparatus 100 maydetermine whether a coding unit split into an odd number exists bydetermining whether the third coding units 1520 a through 1520 e areprocessable in a certain order. Referring to FIG. 15 , the imagedecoding apparatus 100 may determine the third coding units 1520 athrough 1520 e by recursively splitting the first coding unit 1500. Theimage decoding apparatus 100 may determine, based on at least one ofblock shape information and split shape information, whether a codingunit is split into an odd number from among shapes into which the firstcoding unit 1500, the second coding units 1510 a and 1510 b, or thethird coding units 1520 a through 1520 e are split. For example, thesecond coding unit 1510 b at the right from among the second codingunits 1510 a and 1510 b may be split into the odd number of third codingunits 1520 c through 1520 e. An order of processing a plurality ofcoding units included in the first coding unit 1500 may be a certainorder (for example, a z-scan order 1530), and the image decodingapparatus 100 may determine whether the third coding units 1520 cthrough 1520 e determined when the second coding unit 1510 b at theright is split into an odd number satisfy a condition of beingprocessable according to the certain order.

According to an embodiment, the image decoding apparatus 100 maydetermine whether the third coding units 1520 a through 1520 e includedin the first coding unit 1500 satisfy a condition of being processableaccording to a certain order, wherein the condition is related towhether at least one of a width and a height of each of the secondcoding units 1510 a and 1510 b is split into halves according toboundaries of the third coding units 1520 a through 1520 e. For example,the third coding units 1520 a and 1520 b determined when the height ofthe second coding unit 1510 a at the left and having a non-square shapeis split into halves satisfy the condition, but it may be determinedthat the third coding units 1520 c through 1520 e do not satisfy thecondition because the boundaries of the third coding units 1520 cthrough 1520 e that are determined when the second coding unit 1510 b atthe right is split into three coding units do not split the width orheight of the second coding unit 1510 b at the right into halves. Theimage decoding apparatus 100 may determine disconnection of a scan orderwhen the condition is not satisfied and determine that the second codingunit 1510 b at the right is split into the odd number of coding units,based on a result of the determination. According to an embodiment, theimage decoding apparatus 100 may set a certain limit on a coding unit ata certain location from among an odd number of coding units obtained bysplitting a coding unit, and since such a limit or certain location hasbeen described above through various embodiments, details thereof arenot provided again.

FIG. 16 illustrates processes of determining at least one coding unitwhen the image decoding apparatus 100 splits a first coding unit 1600,according to an embodiment. According to an embodiment, a receiver ofthe image decoding apparatus 100 may split the first coding unit 1600based on at least one of obtained block shape information and splitshape information obtained. The first coding unit 1600 having a squareshape may be split into four coding units having a square shape or aplurality of coding units having a non-square shape. For example,referring to FIG. 16 , when block shape information indicates that thefirst coding unit 1600 is a square and split shape information indicatesa split into non-square coding units, the image decoding apparatus 100may split the first coding unit 1600 into a plurality of non-squarecoding units. In detail, when split shape information indicates that anodd number of coding units are determined by splitting the first codingunit 1600 in a horizontal direction or a vertical direction, the imagedecoding apparatus 100 may determine, as the odd number of coding units,second coding units 1610 a through 1610 c by splitting the first codingunit 1600 having a square shape in a vertical direction, or secondcoding units 1620 a through 1620 c by splitting the first coding unit1600 in a horizontal direction.

According to an embodiment, the image decoding apparatus 100 maydetermine whether the second coding units 1610 a through 1610 c and 1620a through 1620 c included in the first coding unit 1600 satisfy acondition of being processable in a certain order, wherein the conditionis related to whether at least one of a width and a height of the firstcoding unit 1600 is split into halves according to boundaries of thesecond coding units 1610 a through 1610 c and 1620 a through 1620 c.Referring to FIG. 16 , since the boundaries of the second coding units1610 a through 1610 c determined when the first coding unit 1600 havinga square shape is split in a vertical direction do not split the widthof the first coding unit 1600 into halves, it may be determined that thefirst coding unit 1600 does not satisfy the condition of beingprocessable in a certain order. Also, since the boundaries of the secondcoding units 1620 a through 1620 c determined when the first coding unit1600 having a square shape is split in a horizontal direction do notsplit the height of the first coding unit 1600 into halves, it may bedetermined that the first coding unit 1600 does not satisfy thecondition of being processable in a certain order. The image decodingapparatus 100 may determine disconnection of a scan order when thecondition is not satisfied and determine that the first coding unit 1600is split into the odd number of coding units based on a result of thedetermination. According to an embodiment, the image decoding apparatus100 may set a certain limit on a coding unit at a certain location fromamong an odd number of coding units obtained by splitting a coding unit,and since such a limit or certain location has been described abovethrough various embodiments, details thereof are not provided again.

According to an embodiment, the image decoding apparatus 100 maydetermine coding units having various shapes by splitting a first codingunit.

Referring to FIG. 16 , the image decoding apparatus 100 may split thefirst coding unit 1600 having a square shape and a first coding unit1630 or 1650 having a non-square shape into coding units having variousshapes.

FIG. 17 illustrates that a shape into which a second coding unit issplittable by the image decoding apparatus 100 is restricted when thesecond coding unit having a non-square shape determined when a firstcoding unit 1700 is split satisfies a certain condition, according to anembodiment.

According to an embodiment, the image decoding apparatus 100 maydetermine that the first coding unit 1700 having a square shape is splitinto second coding units 1710 a and 1710 b or 1720 a and 1720 b having anon-square shape, based on at least one of block shape information andsplit shape information obtained through the receiver. The second codingunits 1710 a and 1710 b or 1720 a and 1720 b may be independently split.Accordingly, the image decoding apparatus 100 may determine that thesecond coding units 1710 a and 1710 b or 1720 a and 1720 b are splitinto a plurality of coding units or are not split based on at least oneof block shape information and split shape information related to eachof the coding units 1710 a and 1710 b or 1720 a and 1720 b. According toan embodiment, the image decoding apparatus 100 may determine thirdcoding units 1712 a and 1712 b by splitting, in a horizontal direction,the second coding unit 1710 a at the left having a non-square shape,which is determined when the first coding unit 1700 is split in avertical direction. However, when the second coding unit 1710 a at theleft is split in the horizontal direction, the image decoding apparatus100 may set a limit that the second coding unit 1710 b at the right isnot split in the horizontal direction like the second coding unit 1710 aat the left. When third coding units 1714 a and 1714 b are determinedwhen the second coding unit 1710 b at the right is split in the samedirection, i.e., the horizontal direction, the third coding units 1712a, 1712 b, 1714 a, and 1714 b are determined when the second codingunits 1710 a at the left and the second coding unit 1710 b at the rightare each independently split in the horizontal direction. However, thisis the same result as splitting the first coding unit 1700 into foursecond coding units 1730 a through 1730 d having a square shape based onat least one of block shape information and split shape information, andthus may be inefficient in terms of image decoding.

According to an embodiment, the image decoding apparatus 100 maydetermine third coding units 1722 a and 1722 b or 1724 a, and 1724 b bysplitting, in a vertical direction, the second coding unit 1720 a or1720 b having a non-square shape determined when the first coding unit1700 is split in the horizontal direction. However, when one of secondcoding units (for example, the second coding unit 1720 a at the top) issplit in a vertical direction, the image decoding apparatus 100 may seta limit that the other second coding unit (for example, the secondcoding unit 1720 b at the bottom) is not split in the vertical directionlike the second coding unit 1720 a at the top for the above describedreasons.

FIG. 18 illustrates processes of the image decoding apparatus 100splitting a coding unit having a square shape when split shapeinformation is unable to indicate that a coding unit is split into foursquare shapes, according to an embodiment.

According to an embodiment, the image decoding apparatus 100 maydetermine second coding units 1810 a and 1810 b, or 1820 a and 1820 b,by splitting a first coding unit 1800 based on at least one of blockshape information and split shape information. Split shape informationmay include information about various shapes into which a coding unitmay be split, but such information about various shapes may not includeinformation for splitting a coding unit into four square coding units.According to such split shape information, the image decoding apparatus100 is unable to split the first coding unit 1800 having a square shapeinto four second coding units 1830 through 1830 d having a square shape.The image decoding apparatus 100 may determine the second coding units1810 a and 1810 b, or 1820 a and 1820 b having a non-square shape basedon the split shape information.

According to an embodiment, the image decoding apparatus 100 mayindependently split each of the second coding units 1810 a and 1810 b,or 1820 a and 1820 b having a non-square shape. Each of the secondcoding units 1810 a and 1810 b, or 1820 a and 1820 b may be split in acertain order via a recursive method that may be a split methodcorresponding to a method of splitting the first coding unit 1800 basedon at least one of the block shape information and the split shapeinformation.

For example, the image decoding apparatus 100 may determine third codingunits 1812 a and 1812 b having a square shape by splitting the secondcoding unit 1810 a at the left in a horizontal direction, or determinethird coding units 1814 a and 1814 b having a square shape by splittingthe second coding unit 1810 b at the right in a horizontal direction. Inaddition, the image decoding apparatus 100 may determine third codingunits 1816 a through 1816 d having a square shape by splitting both thesecond coding unit 1810 a at the left and the second coding unit 1810 bat the right in the horizontal direction. In this case, coding units maybe determined in the same manner as when the first coding unit 1800 issplit into four second coding units 1830 a through 1830 d having asquare shape.

As another example, the image decoding apparatus 100 may determine thirdcoding units 1822 a and 1822 b having a square shape by splitting thesecond coding unit 1820 a at the top in a vertical direction anddetermine third coding units 1824 a and 1824 b having a square shape bysplitting the second coding unit 1820 b at the bottom in a verticaldirection. In addition, the image decoding apparatus 100 may determinethird coding units 1826 a through 1826 d having a square shape bysplitting both the second coding unit 1820 a at the top and the secondcoding unit 1820 b at the bottom in the vertical direction. In thiscase, coding units may be determined in the same manner as when thefirst coding unit 1800 is split into four second coding units 1830 athrough 1830 d having a square shape.

FIG. 19 illustrates that an order of processing a plurality of codingunits may be changed according to processes of splitting a coding unit,according to an embodiment.

According to an embodiment, the image decoding apparatus 100 may split afirst coding unit 1900 based on block shape information and split shapeinformation. When the block shape information indicates a square shapeand the split shape information indicates that the first coding unit1900 is split in at least one of a horizontal direction and a verticaldirection, the image decoding apparatus 100 may split the first codingunit 1900 to determine second coding units 1910 a and 1910 b, or 1920 aand 1920 b. Referring to FIG. 19 , the second coding units 1910 a and1910 b, or 1920 a and 1920 b having a non-square shape and determinedwhen the first coding unit 1900 is split in the horizontal direction orthe vertical direction may each be independently split based on blockshape information and split shape information. For example, the imagedecoding apparatus 100 may determine third coding units 1916 a through1916 d by splitting, in the horizontal direction, each of the secondcoding units 1910 a and 1910 b generated as the first coding unit 1900is split in the vertical direction, or determine third coding units 1926a through 1926 d by splitting, in the vertical direction, the secondcoding units 1920 a and 1920 b generated as the first coding unit 1900is split in the horizontal direction. Processes of splitting the secondcoding units 1910 a and 1910 b, or 1920 a and 1920 b have been describedabove with reference to FIG. 17 , and thus details thereof are notprovided again.

According to an embodiment, the image decoding apparatus 100 may processcoding units according to a certain order. Features about processingcoding units according to a certain order have been described above withreference to FIG. 14 , and thus details thereof are not provided again.Referring to FIG. 19 , the image decoding apparatus 100 may determinefour third coding units 1916 a through 1916 d or 1926 a through 1926 dhaving a square shape by splitting the first coding unit 1900 having asquare shape. According to an embodiment, the image decoding apparatus100 may determine an order of processing the third coding units 1916 athrough 1916 d or 1926 a through 1926 d based on how the first codingunit 1900 is split.

According to an embodiment, the image decoding apparatus 100 maydetermine the third coding units 1916 a through 1916 d by splitting, inthe horizontal direction, the second coding units 1910 a and 1910 bgenerated as the first coding unit 1900 is split in the verticaldirection, and process the third coding units 1916 a through 1916 daccording to an order 1917 of first processing, in the verticaldirection, the third coding units 1916 a and 1916 b included in thesecond coding unit 1910 a at the left, and then processing, in thevertical direction, the third coding units 1916 c and 1916 d included inthe second coding unit 1910 b at the right.

According to an embodiment, the image decoding apparatus 100 maydetermine the third coding units 1926 a through 1926 d by splitting, inthe vertical direction, the second coding units 1920 a and 1920 bgenerated as the first coding unit 1900 is split in the horizontaldirection, and process the third coding units 1926 a through 1926 daccording to an order 1927 of first processing, in the horizontaldirection, the third coding units 1926 a and 1926 b included in thesecond coding unit 1920 a at the top, and then processing, in thehorizontal direction, the third coding units 1926 c and 1926 d includedin the second coding unit 1920 b at the bottom.

Referring to FIG. 19 , the third coding units 1916 a through 1916 d or1926 a through 1926 d having a square shape may be determined when thesecond coding units 1910 a and 1910 b, or 1920 a and 1920 b are eachsplit. The second coding units 1910 a and 1910 b determined when thefirst coding unit 1900 is split in the vertical direction and the secondcoding units 1920 a and 1920 b determined when the first coding unit1900 is split in the horizontal direction are split in different shapes,but according to the third coding units 1916 a through 1916 d and 1926 athrough 1926 d determined afterwards, the first coding unit 1900 issplit in coding units having same shapes. Accordingly, the imagedecoding apparatus 100 may process pluralities of coding unitsdetermined in same shapes in different orders even when the coding unitshaving the same shapes are consequently determined when coding units arerecursively split through different processes based on at least one ofblock shape information and split shape information.

FIG. 20 illustrates processes of determining a depth of a coding unit asa shape and size of the coding unit are changed, when a plurality ofcoding units are determined when the coding unit is recursively split,according to an embodiment.

According to an embodiment, the image decoding apparatus 100 maydetermine a depth of a coding unit according to a certain standard. Forexample, the certain standard may be a length of a long side of thecoding unit. When a length of a long side of a current coding unit issplit 2 n times shorter than a length of a long side of a coding unitbefore being split, it may be determined that a depth of the currentcoding unit is increased n times a depth of the coding unit before beingsplit, wherein n>0. Hereinafter, a coding unit having an increased depthis referred to as a coding unit of a lower depth.

Referring to FIG. 20 , the image decoding apparatus 100 may determine asecond coding unit 2002 and a third coding unit 2004 of lower depths bysplitting a first coding unit 2000 having a square shape, based on blockshape information indicating a square shape (for example, block shapeinformation may indicate ‘0:SQURE’), according to an embodiment. When asize of the first coding unit 2000 having a square shape is 2N×2N, thesecond coding unit 2002 determined by splitting a width and a height ofthe first coding unit 2000 by 1/21 may have a size of N×N. In addition,the third coding unit 2004 determined by splitting a width and a heightof the second coding unit 2002 by ½ may have a size of N/2×N/2. In thiscase, a width and a height of the third coding unit 2004 corresponds to1/22 of the first coding unit 2000. When a depth of first coding unit2000 is D, a depth of the second coding unit 2002 having 1/21 of thewidth and the height of the first coding unit 2000 may be D+1, and adepth of the third coding unit 2004 having 1/22 of the width and theheight of the first coding unit 2000 may be D+2.

According to an embodiment, the image decoding apparatus 100 maydetermine a second coding unit 2012 or 2022 and a third coding unit 2014or 2024 by splitting a first coding unit 2010 or 2020 having anon-square shape, based on block shape information indicating anon-square shape (for example, block shape information may indicate‘1:NS_VER’ indicating a non-square shape in which a height is longerthan a width, or ‘2:NS_HOR’ indicating a non-square shape in which awidth is longer than a height), according to an embodiment.

The image decoding apparatus 100 may determine a second coding unit (forexample, the second coding unit 2002, 2012, or 2022) by splitting atleast one of a width and a height of the first coding unit 2010 having asize of N×2N. In other words, the image decoding apparatus 100 maydetermine the second coding unit 2002 having a size of N×N or the secondcoding unit 2022 having a size of N×N/2 by splitting the first codingunit 2010 in a horizontal direction, or determine the second coding unit2012 having a size of N/2×N by splitting the first coding unit 2010 inhorizontal and vertical directions.

The image decoding apparatus 100 may determine a second coding unit (forexample, the second coding unit 2002, 2012, or 2022) by splitting atleast one of a width and a height of the first coding unit 2020 having asize of 2N×N. In other words, the image decoding apparatus 100 maydetermine the second coding unit 2002 having a size of N×N or the secondcoding unit 2012 having a size of N/2×N by splitting the first codingunit 2020 in a vertical direction, or determine the second coding unit2022 having a size of N×N/2 by splitting the first coding unit 2010 inhorizontal and vertical directions.

According to an embodiment, the image decoding apparatus 100 maydetermine a third coding unit (for example, the third coding unit 2004,2014, or 2024) by splitting at least one of a width and a height of thesecond coding unit 2002 having a size of N×N. In other words, the imagedecoding apparatus 100 may determine the third coding unit 2004 having asize of N/2×N/2, the third coding unit 2014 having a size of N/22×N/2,or the third coding unit 2024 having a size of N/2×N/22 by splitting thesecond coding unit 2002 in vertical and horizontal directions.

According to an embodiment, the image decoding apparatus 100 maydetermine a third coding unit (for example, the third coding unit 2004,2014, or 2024) by splitting at least one of a width and a height of thesecond coding unit 2022 having a size of N/2×N. In other words, theimage decoding apparatus 100 may determine the third coding unit 2004having a size of N/2×N/2 or the third coding unit 2024 having a size ofN/2×N/22 by splitting the second coding unit 2012 in a horizontaldirection, or the third coding unit 2014 having a size of N/22×N/2 bysplitting the second coding unit 2012 in vertical and horizontaldirections.

According to an embodiment, the image decoding apparatus 100 maydetermine a third coding unit (for example, the third coding unit 2004,2014, or 2024) by splitting at least one of a width and a height of thesecond coding unit 2022 having a size of N×N/2. In other words, theimage decoding apparatus 100 may determine the third coding unit 2004having a size of N/2×N/2 or the third coding unit 2014 having a size ofN/22×N/2 by splitting the second coding unit 2022 in a verticaldirection, or the third coding unit 2024 having a size of N/2×N/22 bysplitting the second coding unit 2022 in vertical and horizontaldirections.

According to an embodiment, the image decoding apparatus 100 may split acoding unit (for example, the first, second, or third coding unit 2000,2002, or 2004) having a square shape in a horizontal or verticaldirection. For example, the first coding unit 2010 having a size of N×2Nmay be determined by splitting the first coding unit 2000 having a sizeof 2N×2N in the vertical direction, or the first coding unit 2020 havinga size of 2N×N may be determined by splitting the first coding unit 2000in the horizontal direction. According to an embodiment, when a depth isdetermined based on a length of a longest side of a coding unit, a depthof a coding unit determined when the first coding unit 2000 having asize of 2N×2N is split in a horizontal or vertical direction may be thesame as a depth of the first coding unit 2000.

According to an embodiment, the width and the height of the third codingunit 2014 or 2024 may be 1/22 of those of the first coding unit 2010 or2020. When the depth of the first coding unit 2010 or 2020 is D, thedepth of the second coding unit 2012 or 2022 that is ½ of the width andthe height of the first coding unit 2010 or 2020 may be D+1, and thedepth of the third coding unit 2014 or 2024 that is 1/22 of the widthand the height of the first coding unit 2010 or 202 may be D+2.

FIG. 21 illustrates a part index (PID) for distinguishing depths andcoding units, which may be determined according to shapes and sizes ofcoding units, according to an embodiment.

According to an embodiment, the image decoding apparatus 100 maydetermine a second coding unit having various shapes by splitting afirst coding unit 2100 having a square shape. Referring to FIG. 21 , theimage decoding apparatus 100 may determine second coding units 2102 aand 2102 b, 2104 a and 2104 b, or 2106 a through 2106 d by splitting thefirst coding unit 2100 in at least one of a vertical direction and ahorizontal direction, according to split shape information. In otherwords, the image decoding apparatus 100 may determine the second codingunits 2102 a and 2102 b, 2104 a and 2104 b, or 2106 a through 2106 dbased on split shape information of the first coding unit 2100.

According to an embodiment, a depth of the second coding units 2102 aand 2102 b, 2104 a and 2104 b, or 2106 a through 2106 d determinedaccording to the split shape information of the first coding unit 2100having a square shape may be determined based on a length of a longside. For example, since a length of one side of the first coding unit2100 having a square shape is the same as a length of a long side of thesecond coding units 2102 a and 2102 b or 2104 a and 2104 b having anon-square shape, the depths of the first coding unit 2100 and thesecond coding units 2102 a and 2102 b or 2104 a and 2104 b having anon-square shape may be the same, i.e., D. On the other hand, when theimage decoding apparatus 100 splits the first coding unit 2100 into thefour second coding units 2106 a through 2106 d having a square shape,based on the split shape information, a length of one side of the secondcoding units 2106 a through 2106 d having a square shape is ½ of thelength of one side of the first coding unit 2100, the depths of thesecond coding units 2106 a through 2106 d may be D+1, i.e., a depthlower than the depth D of the first coding unit 2100.

According to an embodiment, the image decoding apparatus 100 may split afirst coding unit 2110, in which a height is longer than a width, in ahorizontal direction into a plurality of second coding units 2112 a and2112 b or 2114 a through 2114 c, according to split shape information.According to an embodiment, the image decoding apparatus 100 may split afirst coding unit 2120, in which a width is longer than a height, in avertical direction into a plurality of second coding units 2122 a and2122 b or 2124 a through 2124 c, according to split shape information.

According to an embodiment, depths of the second coding units 2112 a and2112 b, 2114 a through 2114 c, 2122 a and 2122 b, or 2124 a through 2124c determined according to the split shape information of the firstcoding unit 2110 or 2120 having a non-square shape may be determinedbased on a length of a long side. For example, since a length of oneside of the second coding units 2112 a and 2112 b having a square shapeis ½ of a length of a long side of the first coding unit 2110 having anon-square shape, in which the height is longer than the width, thedepths of the second coding units 2112 a and 2112 b are D+1, i.e.,depths lower than the depth D of the first coding unit 2110 having anon-square shape.

In addition, the image decoding apparatus 100 may split the first codingunit 2110 having a non-square shape into an odd number of second codingunits 2114 a through 2114 c, based on split shape information. The oddnumber of second coding units 2114 a through 2114 c may include thesecond coding units 2114 a and 2114 c having a non-square shape, and thesecond coding unit 2114 b having a square shape. In this case, since alength of a long side of the second coding units 2114 a and 2114 chaving a non-square shape and a length of one side of the second codingunit 2114 b having a square shape are ½ of a length of one side of thefirst coding unit 2110, depths of the second coding units 2114 a through2114 b may be D+1, i.e., a depth lower than the depth D of the firstcoding unit 2110. The image decoding apparatus 100 may determine depthsof coding units related to the first coding unit 2120 having anon-square shape in which a width is longer than a height, in the samemanner as the determining of depths of coding units related to the firstcoding unit 2110.

According to an embodiment, with respect to determining PIDs fordistinguishing coding units, when an odd number of coding units do nothave the same size, the image decoding apparatus 100 may determine PIDsbased on a size ratio of the coding units. Referring to FIG. 21 , thesecond coding unit 2114 b located at the center from the odd number ofsecond coding units 2114 a through 2114 c may have the same width as thesecond coding units 2114 a and 2114 c, but have a height twice higherthan those of the second coding units 2114 a and 2114 c. In this case,the second coding unit 2114 b located at the center may include two ofthe second coding units 2114 a and 2114 c. Accordingly, when the PID ofthe second coding unit 2114 b located at the center is 1 according to ascan order, the PID of the second coding unit 2114 c in a next order maybe 3, the PID having increased by 2. In other words, values of the PIDmay be discontinuous. According to an embodiment, the image decodingapparatus 100 may determine whether an odd number of coding units havethe same sizes based on discontinuity of PID for distinguishing thecoding units.

According to an embodiment, the image decoding apparatus 100 maydetermine whether a plurality of coding units determined when a currentcoding unit is split have certain split shapes based on values of PID.Referring to FIG. 21 , the image decoding apparatus 100 may determinethe even number of second coding units 2112 a and 211 b or the oddnumber of second coding units 2114 a through 2114 c by splitting thefirst coding unit 2110 having a rectangular shape in which the height islonger than the width. The image decoding apparatus 100 may use the PIDindicating each coding unit so as to distinguish a plurality of codingunits. According to an embodiment, a PID may be obtained from a sampleat a certain location (for example, an upper left sample) of each codingunit.

According to an embodiment, the image decoding apparatus 100 maydetermine a coding unit at a certain location from among coding unitsdetermined by using PIDs for distinguishing coding units. According toan embodiment, when split shape information of the first coding unit2110 having a rectangular shape in which a height is longer than a widthindicates that the first coding unit 2110 is split into three codingunits, the image decoding apparatus 100 may split the first coding unit2110 into the three second coding units 2114 a through 2114 c. The imagedecoding apparatus 100 may assign a PID to each of the three secondcoding units 2114 a through 2114 c. The image decoding apparatus 100 maycompare PIDs of an odd number of coding units so as to determine acenter coding unit from among the coding units. The image decodingapparatus 100 may determine, as a coding unit at a center location fromamong coding units determined when the first coding unit 2110 is split,the second coding unit 2114 b having a PID corresponding to a centervalue from among PIDs, based on PIDs of the coding units. According toan embodiment, while determining PIDs for distinguishing coding units,when the coding units do not have the same sizes, the image decodingapparatus 100 may determine PIDs based on a size ratio of the codingunits. Referring to FIG. 21 , the second coding unit 2114 b generatedwhen the first coding unit 2110 is split may have the same width as thesecond coding units 2114 a and 2114 c, but may have a height twicehigher than those of the second coding units 2114 a and 2114 c. In thiscase, when the PID of the second coding unit 2114 b located at thecenter is 1, the PID of the second coding unit 2114 c in a next ordermay be 3, the PID having increased by 2. As such, when an increasingrange of PIDs differs while uniformly increasing, the image decodingapparatus 100 may determine that a current coding unit is split into aplurality of coding units including a coding unit having a differentsize from other coding units. According to an embodiment, when splitshape information indicates splitting into an odd number of codingunits, the image decoding apparatus 100 may split a current coding unitinto a plurality of coding units, in which a coding unit at a certainlocation (for example, a center coding unit) has a size different fromother coding units. In this case, the image decoding apparatus 100 maydetermine the center coding unit having the different size by using PIDsof the coding units. However, a PID, and a size or location of a codingunit at a certain location described above are specified to describe anembodiment, and thus should not be limitedly interpreted, and variousPIDs, and various locations and sizes of a coding unit may be used.

According to an embodiment, the image decoding apparatus 100 may use acertain data unit from which recursive splitting of a coding unit isstarted.

FIG. 22 illustrates that a plurality of coding units are determinedaccording to a plurality of certain data units included in a picture,according to an embodiment.

According to an embodiment, a certain data unit may be defined as a dataunit from which a coding unit starts to be recursively split by using atleast one of block shape information and split shape information. Inother words, the certain data unit may correspond to a coding unit of anuppermost depth used while determining a plurality of coding units bysplitting a current picture. Hereinafter, the certain data unit isreferred to as a reference data unit for convenience of description.

According to an embodiment, the reference data unit may indicate acertain size and shape. According to an embodiment, the reference dataunit may include M×N samples. Here, M and N may be the same, and may bean integer expressed as a multiple of 2. In other words, a referencedata unit may indicate a square shape or a non-square shape and maylater be split into an integer number of coding units.

According to an embodiment, the image decoding apparatus 100 may split acurrent picture into a plurality of reference data units. According toan embodiment, the image decoding apparatus 100 may split the pluralityof reference data units obtained by splitting the current picture byusing split information about each of the reference data units. Splitprocesses of such reference data units may correspond to split processesusing a quad-tree structure.

According to an embodiment, the image decoding apparatus 100 maypre-determine a smallest size available for the reference data unitincluded in the current picture. Accordingly, the image decodingapparatus 100 may determine the reference data unit having various sizesthat are equal to or larger than the smallest size and determine atleast one coding unit based on the determined reference data unit byusing block shape information and split shape information.

Referring to FIG. 22 , the image decoding apparatus 100 may use areference coding unit 2200 having a square shape, or may use a referencecoding unit 2202 having a non-square shape. According to an embodiment,a shape and size of a reference coding unit may be determined accordingto various data units (for example, a sequence, a picture, a slice, aslice segment, and a largest coding unit) that may include at least onereference coding unit.

According to an embodiment, the receiver of the image decoding apparatus100 may obtain, from a bitstream, at least one of information about ashape of a reference coding unit and information about a size of thereference coding unit, according to the various data units. Processes ofdetermining at least one coding unit included in the reference codingunit 2200 having a square shape have been described above throughprocesses of splitting the current coding unit 1000 of FIG. 10 , andprocesses of determining at least one coding unit included in thereference coding unit 2200 having a non-square shape have been describedabove through processes of splitting the current coding unit 1100 or1150 of FIG. 11 , and thus details thereof are not provided again.

According to an embodiment, in order to determine a size and shape of areference coding unit according to some data units pre-determined basedon a predetermined condition, the image decoding apparatus 100 may use aPID for distinguishing the size and shape of the reference coding unit.In other words, the receiver may obtain, from a bitstream, only a PIDfor distinguishing a size and shape of a reference coding unit as a dataunit satisfying a predetermined condition (for example, a data unithaving a size equal to or smaller than a slice) from among various dataunits (for example, a sequence, a picture, a slice, a slice segment, anda largest coding unit), according to slices, slice segments, and largestcoding units. The image decoding apparatus 100 may determine the sizeand shape of the reference data unit according to data units thatsatisfy the predetermined condition, by using the PID. When informationabout a shape of a reference coding unit and information about a size ofa reference coding unit are obtained from a bitstream and used accordingto data units having relatively small sizes, usage efficiency of thebitstream may not be sufficient, and thus instead of directly obtainingthe information about the shape of the reference coding unit and theinformation about the size of the reference coding unit, only a PID maybe obtained and used. In this case, at least one of the size and theshape of the reference coding unit corresponding to the PID indicatingthe size and shape of the reference coding unit may be pre-determined.In other words, the image decoding apparatus 100 may select at least oneof the pre-determined size and shape of the reference coding unitaccording to the PID so as to determine at least one of the size andshape of the reference coding unit included in a data unit that is acriterion for obtaining the PID.

According to an embodiment, the image decoding apparatus 100 may use atleast one reference coding unit included in one largest coding unit. Inother words, a largest coding unit splitting an image may include atleast one reference coding unit, and a coding unit may be determinedwhen each of the reference coding unit is recursively split. Accordingto an embodiment, at least one of a width and height of the largestcoding unit may be an integer times at least one of a width and heightof the reference coding unit. According to an embodiment, a size of areference coding unit may be equal to a size of a largest coding unit,which is split n times according to a quad-tree structure. In otherwords, the image decoding apparatus 100 may determine a reference codingunit by splitting a largest coding unit n times according to a quad-treestructure and split the reference coding unit based on at least one ofblock shape information and split shape information according to variousembodiments.

FIG. 23 illustrates a processing block serving as a criterion ofdetermining a determination order of reference coding units included ina picture 2300, according to an embodiment.

According to an embodiment, the image decoding apparatus 100 maydetermine at least one processing block splitting a picture. Aprocessing block is a data unit including at least one reference codingunit splitting an image, and the at least one reference coding unitincluded in the processing block may be determined in a certain order.In other words, a determining order of the at least one reference codingunit determined in each processing block may correspond to one ofvarious orders for determining a reference coding unit and may varyaccording to processing blocks. A determining order of reference codingunits determined per processing block may be one of various orders, suchas a raster scan order, a Z-scan order, an N-scan order, an up-rightdiagonal scan order, a horizontal scan order, and a vertical scan order,but should not be limitedly interpreted with respect to the scan orders.

According to an embodiment, the image decoding apparatus 100 maydetermine a size of at least one processing block included in an imageby obtaining information about a size of a processing block. The imagedecoding apparatus 100 may obtain, from a bitstream, the informationabout a size of a processing block to determine the size of the at leastone processing block included in the image. The size of the processingblock may be a certain size of a data unit indicated by the informationabout a size of a processing block.

According to an embodiment, the receiver of the image decoding apparatus100 may obtain, from the bitstream, the information about a size of aprocessing block according to certain data units. For example, theinformation about a size of a processing block may be obtained from thebitstream in data units of images, sequences, pictures, slices, andslice segments. In other words, the receiver may obtain, from thebitstream, the information about a size of a processing block accordingto such several data units, and the image decoding apparatus 100 maydetermine the size of at least one processing block splitting thepicture by using the obtained information about a size of a processingblock, wherein the size of the processing block may be an integer timesa size of a reference coding unit.

According to an embodiment, the image decoding apparatus 100 maydetermine sizes of processing blocks 2302 and 2312 included in thepicture 2300. For example, the image decoding apparatus 100 maydetermine a size of a processing block based on information about a sizeof a processing block, the information being obtained from a bitstream.Referring to FIG. 23 , the image decoding apparatus 100 may determinehorizontal sizes of the processing blocks 2302 and 2312 to be four timesa horizontal size of a reference coding unit, and a vertical sizethereof to be four times a vertical size of the reference coding unit,according to an embodiment. The image decoding apparatus 100 maydetermine a determining order of at least one reference coding unit inat least one processing block.

According to an embodiment, the image decoding apparatus 100 maydetermine each of the processing blocks 2302 and 2312 included in thepicture 2300 based on a size of a processing block, and determine adetermining order of at least one reference coding unit included in eachof the processing blocks 2302 and 2312. According to an embodiment,determining of a reference coding unit may include determining a size ofthe reference coding unit.

According to an embodiment, the image decoding apparatus 100 may obtain,from a bitstream, information about a determining order of at least onereference coding unit included in at least one processing block, anddetermine the determining order of the at least one reference codingunit based on the obtained information. The information about adetermining order may be defined as an order or direction of determiningreference coding units in a processing block. In other words, an orderof determining reference coding units may be independently determinedper processing block.

According to an embodiment, the image decoding apparatus 100 may obtain,from a bitstream, information about a determining order of a referencecoding unit according to certain data units. For example, the receivermay obtain, from the bitstream, the information about a determiningorder of a reference coding unit according to data units, such asimages, sequences, pictures, slices, slice segments, and processingblocks. Since the information about a determining order of a referencecoding unit indicates a determining order of a reference coding unit ina processing block, the information about a determining order may beobtained per certain data unit including an integer number of processingblocks.

According to an embodiment, the image decoding apparatus 100 maydetermine at least one reference coding unit based on the determinedorder.

According to an embodiment, the receiver may obtain, from the bitstream,information about a determining order of a reference coding unit, asinformation related to the processing blocks 2302 and 2312, and theimage decoding apparatus 100 may determine an order of determining atleast one reference coding unit included in the processing blocks 2302and 2312 and determine at least one reference coding unit included inthe picture 2300 according to a determining order of a coding unit.Referring to FIG. 23 , the image decoding apparatus 100 may determinedetermining orders 2304 and 2314 of at least one reference coding unitrespectively related to the processing blocks 2302 and 2312. Forexample, when information about a determining order of a referencecoding unit is obtained per processing block, determining orders of areference coding unit related to the processing blocks 2302 and 2312 maybe different from each other. When the determining order 2304 related tothe processing block 2302 is a raster scan order, reference coding unitsincluded in the processing block 2302 may be determined according to theraster scan order. On the other hand, when the determining order 2314related to the processing block 2312 is an inverse order of a rasterscan order, reference coding units included in the processing block 2312may be determined in the inverse order of the raster scan order.

The image decoding apparatus 100 may decode determined at least onereference coding unit, according to an embodiment. The image decodingapparatus 100 may decode an image based on reference coding unitsdetermined through above embodiments. Examples of a method of decoding areference coding unit may include various methods of decoding an image.

According to an embodiment, the image decoding apparatus 100 may obtain,from a bitstream, and use block shape information indicating a shape ofa current coding unit or split shape information indicating a method ofsplitting the current coding unit. The block shape information or thesplit shape information may be included in a bitstream related tovarious data units. For example, the image decoding apparatus 100 mayuse the block shape information or split shape information, which isincluded in a sequence parameter set, a picture parameter set, a videoparameter set, a slice header, and a slice segment header. In addition,the image decoding apparatus 100 may obtain, from a bitstream, and usesyntax corresponding to the block shape information or the split shapeinformation, according to largest coding units, reference coding units,and processing blocks.

While this disclosure has been particularly shown and described withreference to embodiments thereof, it will be understood by those ofordinary skill in the art that various changes in form and details maybe made therein without departing from the spirit and scope of thedisclosure as defined by the appended claims. The embodiments should beconsidered in a descriptive sense only and not for purposes oflimitation. Therefore, the scope of the disclosure is defined not by thedetailed description of the disclosure but by the appended claims, andall differences within the scope will be construed as being included inthe present disclosure.

The embodiments of the present disclosure can be written as computerprograms and can be implemented in general-use digital computers thatexecute the programs using a computer readable recording medium.Examples of the computer readable recording medium include magneticstorage media (e.g., ROM, floppy disks, hard disks, etc.), opticalrecording media (e.g., CD-ROMs or DVDs), etc.

The invention claimed is:
 1. A method of decoding an image, the methodcomprising: obtaining, from a bitstream, information indicating whethera planar mode is used as an intra prediction mode for a current block ornot; if the information indicates that the planar mode is not used asthe intra prediction mode for the current block, obtaining, from thebitstream, an index indicating a particular most probable mode among aplurality of most probable modes, wherein the plurality of most probablemodes are determined based on at least one of an intra prediction modeof a block adjacent to a left of the current block and an intraprediction mode of a block adjacent to a top of the current block;determining the intra prediction mode for the current block using theparticular most probable mode indicated by the index among the pluralityof most probable modes; and decoding the current block according to thedetermined intra prediction mode for the current block.